Zoltan Borok-Nagy has uploaded this change for review. ( https://gerrit.cloudera.org/25586
Change subject: PROTOTYPE IMPALA-15861: Coalesce broadcast batches while RPCs are in flight ...................................................................... PROTOTYPE IMPALA-15861: Coalesce broadcast batches while RPCs are in flight An UNPARTITIONED (broadcast) KrpcDataStreamSender sends every input row batch to every channel as its own TransmitData() RPC, with one RPC in flight per channel. At the default batch size of 1024 rows, a large broadcast on a few big hosts is bound by network round trips rather than bandwidth, and the sender mostly waits for in-flight RPCs. With --data_stream_sender_broadcast_batch_bytes > 0 (default 0 keeps the current code path), a broadcast sender with more than one channel follows a Nagle rule. An input batch that finds no pending rows and every channel idle is sent on its own right away, as before. Otherwise its rows are appended with the codegen'd AppendRowWithDedup() to one pending batch. That is sent by the first Send() that finds every channel idle, before an input batch would take it past the flag value (at most 8 MB) or 64K rows, and by FlushFinal(). Rows keep their order. If the producer stalls, pending rows wait for the next input batch. New profile counters show the coalesced sends and rows, the pending high-water mark and that wait. A prototype of this change with a 1 MiB target was measured with COMPUTE_PROCESSING_COST=true on 3 executors with 64 vCPUs each. TPC-H SF1000 took 197.5 s instead of 228.9 s (-13.7%; sum of the per-query best of 3 iterations, mean of 2 runs, without q4, q9, q13 and q21, which vary with restarts). 8 TPC-DS SF10000 queries (q2, q6, q15, q24_1, q35, q38, q45, q87; same metric, 1 run) took 177.4 s instead of 313.4 s (-43.4%). On 12 executors with 16 vCPUs each, TPC-H gains only 2.5% (within the run-to-run spread) and the 8 TPC-DS queries take 2.4% longer, because q2 loses a runtime filter race: its median of 10 iterations goes from 4.9 to 13.0 s (median of 8: 5.1 s with RUNTIME_FILTER_WAIT_TIME_MS=10000). Without the sender's backpressure, its date_dim scan passes 43,008-73,049 rows instead of 11,264-13,312 before a filter that arrives 12-15 ms after the scan's 1 s wait, so fact-scan pruning fails. Testing: - New DataStreamTest.BroadcastCoalescing and BroadcastCoalescingInOrder. - TPC-H and TPC-DS runs above: no row-count mismatches against master. Change-Id: Ib2c669e4c86dce946e8342e57bf002805733ba2b Assisted-by: Claude Opus 5.5 (Claude Code) --- M be/src/runtime/data-stream-test.cc M be/src/runtime/krpc-data-stream-sender.cc M be/src/runtime/krpc-data-stream-sender.h M be/src/runtime/outbound-row-batch.h 4 files changed, 454 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/86/25586/1 -- To view, visit https://gerrit.cloudera.org/25586 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2c669e4c86dce946e8342e57bf002805733ba2b Gerrit-Change-Number: 25586 Gerrit-PatchSet: 1 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
