[Feature Request]: Bound PGBKCVOperation precombine table by in-memory size, not key count

Đang mở
#39,754 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #39767 của @Dharshika-11 — đã đóng, không merge

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
data-engineering

Hướng nghiên cứu

Bắt đầu trong sdks/python/apache_beam/runners/worker/operations.py tại PGBKCVOperation và TODO của nó về việc giới hạn theo kích thước trong bộ nhớ. So sánh với PGBKOperation tương ứng và kiểm tra cách các accumulator Count, Mean, min, max và sum được biểu diễn. Hoàn thành khi bảng precombine được giới hạn bằng một ước tính kích thước trong bộ nhớ thay vì chỉ dựa vào số lượng key, đồng thời tính đến các accumulator được bọc hoặc native.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

P3
What would you like to happen?

PGBKCVOperation (sdks/python/apache_beam/runners/worker/operations.py) caps its precombine table by key count (max_keys, default 100k / 1M for Count/Mean/min/max/sum), flushing ~10% of keys once the count is hit. The code already flags this as a stopgap:

# TODO(b/36567833): Bound by in-memory size rather than key count.

A fixed key-count cap is a poor memory proxy when accumulators vary in size, so workers can OOM well below max_keys (or flush needlessly when accumulators are tiny). Request: bound the table by estimated in-memory size instead of (or in addition to) key count.

Notes:

  • b/36567833 is a Google-internal Buganizer ref with no public page; this issue tracks it publicly.
  • Sibling PGBKOperation has the same shape (max_size = 10 * 1000 elements).
  • Sizing accurately is the hard part — sys.getsizeof undercounts wrapped/native (e.g. C-extension) accumulators; a coder-based or sampled-RSS estimate is likely needed.
Issue Priority

Priority: 3 (nice-to-have improvement)

Issue Components
  • Component: Python SDK
Ngôn ngữ chính
Java
Star
8.7k
Fork
4.8k
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
368

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/beam

Tất cả issue của apache/beam

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.