Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/25205
Change subject: PROTOTYPE: Size hash exchange sender buffers from the channel count ...................................................................... PROTOTYPE: Size hash exchange sender buffers from the channel count A hash partitioned sender keeps two row batches per channel and moves one batch per channel per network round trip. With one size for all senders, a size that keeps the memory of senders with many channels low leaves senders with few channels bound by round trips. This builds on change 25141 for IMPALA-15512, which sends a channel's batch once its serialized size reaches --data_stream_sender_buffer_size (64 KB) and uses the same size in the planner. On top of the flat 64 KB, hash and Kudu partitioned senders use clamp(--data_stream_sender_buffer_budget_bytes / (2 * channels), --data_stream_sender_buffer_size, --data_stream_sender_max_channel_buffer_bytes) per channel. The new flags default to 4 MB and 256 KB: up to 8 channels get 256 KB, 32 or more keep 64 KB, so a sender's batches stay within about 4 MB unless the flat size needs more. A budget of 0 gives the flat size. The size is shown as PerChannelBufferSize in the profile. The flags reach the planner through BackendGflags, and DataStreamSink uses the same size for the sender buffer and receiver queue estimates, capped by the estimated bytes per sender and channel. Testing: - TPC-DS SF100, 5 executors, MT_DOP=0, against a 16 KB buffer: adaptive -21.9% (-9.6% without q72/q78), a flat 64 KB -20.7% (-9.4%) in a separate run. Two runs of a flat 128 KB gave -21.6% and -25.2%, so the data cannot tell what adaptive adds over a flat 64 KB. These runs predate change 25141 and sized batches by row count (about 2x the flag); its flat 64 KB was not measured. Much of the gain came from 0.5-0.7 ms round trips to two hosts; the median query did not change. - Syntax-checked only, not built or run. Planner test expectations are not updated; estimates of hash exchanges with few receivers change. Change-Id: I96b35b1b73f1b57f41ae06a27d9b44ecad3c050c 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/util/backend-gflag-util.cc M common/thrift/BackendGflags.thrift M fe/src/main/java/org/apache/impala/planner/DataStreamSink.java M fe/src/main/java/org/apache/impala/service/BackendConfig.java 7 files changed, 115 insertions(+), 6 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/05/25205/1 -- To view, visit http://gerrit.cloudera.org:8080/25205 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I96b35b1b73f1b57f41ae06a27d9b44ecad3c050c Gerrit-Change-Number: 25205 Gerrit-PatchSet: 1 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
