Repository navigation
perf(execution): reduce projection, spill and allocation overhead - #32391
Conversation
Keep the logical aggregate chunk address space while avoiding full-chunk allocation and clearing for small fixed-state windows. Use bounded logical row views for compact destination vectors; preserve normal Group allocation and fallback paths. Validate snapshot arithmetic, chunk extension, unsupported states and allocation rollback. Native TPC-DS Q51 improves at both DOP64 and DOP16 with identical results and plans; ordinary aggregate throughput remains near baseline.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 62d0420dfd89248e4b85fc302c02103723bf86b3
Assessment: approve
No blocking findings remain. The four fast paths reuse existing vector, spill, aggregate and cache owners. Measured component gains justify the narrow additions and safe logical-length views, with a small scalar-fill cost recorded as an accepted tradeoff.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed all 17 changed paths, both discussion entries, and the linked roadmap with its three comments.
-
Go1.27.1 SIMD/v3: all seven owning packages passed normal tests (1,880 top-level tests). Malloc passed its race suite and 300 focused adaptive race repetitions.
-
Boundary, metadata, byte-equivalence, allocation-failure/retry and cleanup oracles passed. Maintained component benchmarks and bounded ABBA base-source controls completed with nonempty selections.
-
Native prerequisites, formatting and frozen-source checks passed. Claimed execution was reconciled with retained logs and command/source/exit receipts in validation-review.json.
Limitations:
-
TPC-DS measurements and the older full-suite run predate the rebase; current full-suite and TPCH runtime non-regression are not established. Raw author performance/SCA logs were unavailable.
-
Local scalar SUM/AVG microbenchmarks increased about 4.9–6.7% (roughly 1.1–1.4ns per Fill); this is a component tradeoff, not proof of an end-to-end regression.
-
The initial toolchain-download timeout was an environment diagnostic; validation resumed successfully using the assigned caches and standard proxy.
❌ Left the queue ·
|
🚫 Left the queue · pull request dequeued19 min in the queue, with no time running CI. So far
Reason Pull request #32391 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
To get back in the queue
Tick the box to put this pull request back in the merge queue (same as
Times in UTC · dashboard · how the merge queue works |
|
@Mergifyio refresh |
✅ Pull request refreshed |
What type of PR is this?
Which issue(s) this PR fixes:
Related to #26768.
What this PR does / why we need it:
Reduce execution overhead without changing query plans, SQL semantics, spill thresholds, or concurrency policy:
MADV_FREE. Keep the original final locked admission check, byte bound, expiry, and unmap fallback.Measured performance
Original TPC-DS 1T SQL on the same 64-logical-CPU / 251 GiB host, with automatic merge disabled, a 192 GiB service cgroup limit,
agg_spill_mem=4 GiB,sort_spill_mem=512 MiB, and automatic join spill:Each comparison checks byte-identical query output and ordinary EXPLAIN output. Q78 has one completed A/B pair. Q67's default-DOP run with a 4 GiB aggregate threshold mostly avoids spilling, so the DOP16 result is not a default-configuration or full-suite speedup claim. The DOP16 cases ran on the same 64-CPU host, not a separate 16-core machine.
These measurements predate this rebase. The earlier full 99-file / 103-statement run passed with the first two changes; the complete four-change head has not had a full-suite rerun. TPC-H runtime non-regression is not yet established.
Validation
At rebased head
62d0420dfd, all seven owning packages passed normal tests with the repository CGo wrapper: malloc, mpool, vector, aggexec, Group, HashJoin, and Window. This includes upstream's Group capacity-retry regression.go vet, gofmt, andgit diff --checkpassed. Tests and vet used production SIMD/v3 mode.Local SCA passed with the repository-pinned molint and golangci-lint 2.14.0 in the SCA target's default build mode (no GOEXPERIMENT, GOAMD64=v1):
make static-check-selected STATIC_CHECK_PACKAGES="./..." GOLANGCI_LINT_CONCURRENCY=2, zero findings. The repository's actual import/test graph selected 392/509 affected packages, crossing its full-scan threshold, so both analyzers checked the full repository.An additional SIMD-tagged SCA attempt found two
checkunsafeviolations in unchanged vector metric files. The same focused command reproduced both at clean upstreamb19ef50f05; that extra build mode is not reported as passing. No analyzer configuration or suppression was changed.No benchmark data, profiles, run-specific fixtures, or experimental prototypes are included in the source changes.