[Enhancement] Arrow Stream Load decompresses record batches on Arrow's global thread pool
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
be/src/format/arrow/arrow_stream_reader.cpp から始めてください。ここでは Stream Load のボディを arrow::ipc::IpcReadOptions::Defaults() で読み込んでいます。そのうえで use_threads がどのように設定されているかを確認してください。同じパターンが arrow_flight_batch_reader.cpp にもあります。完了の条件は、Stream Load の読み込みパスがスキャナースレッド上で展開を行うこと(必要に応じて BE 設定の背後に置く)、既存の Arrow ロードテストがすべて通ること、そしてベンチマークでスループットの変化が確認できることです。
索引モデルが issue の本文から書いたものです。
説明
Search before asking
- I had searched in the issues and found no similar issues.
Description
ArrowStreamReader reads Stream Load bodies with arrow::ipc::IpcReadOptions::Defaults() (be/src/format/arrow/arrow_stream_reader.cpp, master too), and that leaves use_threads = true. For compressed IPC streams (ZSTD/LZ4 record batches), Arrow then decompresses every record batch's buffers on Arrow's single process-wide CPU thread pool, not on the scanner thread doing the read.
Under many concurrent Arrow loads, scanner threads mostly wait on that one pool's mutex and condition variable. Off-CPU stacks show around 75 scanner threads per BE parked in pthread_cond_signal / arrow::internal::ThreadPool::SpawnReal, while the BE stays well below CPU saturation.
Measurements
4 BEs (192 vCPU each, arm64), cloud mode, many concurrent Stream Loads, ZSTD-compressed Arrow record batches:
- default
IpcReadOptions(global pool): plateau of about 5.7M rows/s total, BEs at about 64% CPU; - the same data sent uncompressed: about 7.1M rows/s;
- ZSTD, with decompression inline on the scanner thread (
use_threads = false): 8.15–8.45M rows/s.
Solution
Read Stream Load bodies with use_threads = false (optionally behind a BE config), so decompression runs on the scanner thread that already owns the load. Load concurrency comes from the scanner pool, so Arrow's internal pool adds only contention. arrow_flight_batch_reader.cpp uses the same pattern and may benefit too.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要言語
- Java
- スター
- 16k
- フォーク
- 4k
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 674
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/doris のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
4.1.4.1 Release Noteオープンrelease notes
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
[Bug] FE metric http_copy_into_query_err_total is registered under the upload error name対応中かも @manesioz が 20 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
apache/doris#68505 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[Pipeline issue] build pipeline does not support to trigger check_coverage_fe by comment対応中かも @Asthenia0412 が 30 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/doris#67785 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug new windows
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
GantMan/jail-monkey#380 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
objectionary/jucs#145 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
objectionary/lints#1559 ·
メンテナーはふだん 2 日以内に返信