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

オープン
#39,754 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

  • #39767 @Dharshika-11 による — マージされずにクローズ

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python

調査の方向性

sdks/python/apache_beam/runners/worker/operations.py の PGBKCVOperation と、メモリ内サイズによる上限設定に関するその TODO から始めます。対応する PGBKOperation と比較し、Count、Mean、min、max、sum の各アキュムレータがどのように表現されているかを調べます。メモリ内サイズの推定値を使用して precombine テーブルに上限を設け、キー数だけに依存せず、ラップされたアキュムレータまたはネイティブアキュムレータも考慮できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Java
スター
8.7k
フォーク
4.8k
平均マージ
2日 9時間
マージ済み PR(30日)
368

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/beam のほかの issue

apache/beam の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。