Repository navigation
perf(group): fuse two-column compact lookups - #32817
Conversation
Conclusion: fused compact lookupQ1 user instructions fall 3.38%/3.39%/2.22% in SF10 memory/SF10 disk/SF100 disk; The implementation removes duplicate descriptor/code traversals without adding Investigating the SF10 slower signalsPrimary SF10 disk Q3/Q5/Q12 wall medians were +10.35%/+14.60%/+17.61%, with almost
Identical-main Q12 varies10.1%; compact lies between. Q3/Q5 primary slowdowns do Measurement scopeMain at capture start, One process per arm/configuration, one excluded cold Q1–Q22 suite followed by five Primary timings include GC and instrumentation. Total sums per-query medians; Exact service pins
sf10-memory: all 22 queries, Total, CPU, instructions and allocations
Allocation counters include common process/scrape and asynchronous engine work. No globally exact copy-byte counter is available. GC CPU is measured process GC CPU, not a wall-time subtraction. | Query | Main Go MB | Candidate Go MB | Go bytes Δ | Main Go objects | Candidate Go objects | Main GC CPU s | Candidate GC CPU s | Native allocation attribution limit: the default allocator publishes counters after a 100 ms window; MPool publishes after a one-second window. Their query-boundary increments are retained in raw JSON, but can belong to neighboring queries. They are not exact per-query allocation evidence and are not used to declare a per-query allocation pass. IO/cache counters overlap the default allocator and must not be added again. Long-window native totals also have endpoint lag; exact per-query native costs need separate operator/component evidence.
Faults/system CPU/read bytes belong to the measured application. THP fallback counts are host-wide supporting evidence; they neither automatically invalidate a result nor excuse an introduced resource regression. External process cores: main 0.442, candidate 0.387; interrupt cores separately: 0.355, 0.351. GC attribution uses period-weighted instruction samples; non-GC figures are estimates, not exact foreground counters. Raw hardware instructions are above.
sf10-disk: all 22 queries, Total, CPU, instructions and allocations
Allocation counters include common process/scrape and asynchronous engine work. No globally exact copy-byte counter is available. GC CPU is measured process GC CPU, not a wall-time subtraction. | Query | Main Go MB | Candidate Go MB | Go bytes Δ | Main Go objects | Candidate Go objects | Main GC CPU s | Candidate GC CPU s | Native allocation attribution limit: the default allocator publishes counters after a 100 ms window; MPool publishes after a one-second window. Their query-boundary increments are retained in raw JSON, but can belong to neighboring queries. They are not exact per-query allocation evidence and are not used to declare a per-query allocation pass. IO/cache counters overlap the default allocator and must not be added again. Long-window native totals also have endpoint lag; exact per-query native costs need separate operator/component evidence.
Faults/system CPU/read bytes belong to the measured application. THP fallback counts are host-wide supporting evidence; they neither automatically invalidate a result nor excuse an introduced resource regression. External process cores: main 0.425, candidate 0.441; interrupt cores separately: 0.351, 0.342. GC attribution uses period-weighted instruction samples; non-GC figures are estimates, not exact foreground counters. Raw hardware instructions are above.
sf100-disk: all 22 queries, Total, CPU, instructions and allocations
Allocation counters include common process/scrape and asynchronous engine work. No globally exact copy-byte counter is available. GC CPU is measured process GC CPU, not a wall-time subtraction. | Query | Main Go MB | Candidate Go MB | Go bytes Δ | Main Go objects | Candidate Go objects | Main GC CPU s | Candidate GC CPU s | Native allocation attribution limit: the default allocator publishes counters after a 100 ms window; MPool publishes after a one-second window. Their query-boundary increments are retained in raw JSON, but can belong to neighboring queries. They are not exact per-query allocation evidence and are not used to declare a per-query allocation pass. IO/cache counters overlap the default allocator and must not be added again. Long-window native totals also have endpoint lag; exact per-query native costs need separate operator/component evidence.
Faults/system CPU/read bytes belong to the measured application. THP fallback counts are host-wide supporting evidence; they neither automatically invalidate a result nor excuse an introduced resource regression. External process cores: main 0.791, candidate 0.494; interrupt cores separately: 0.627, 0.610. GC attribution uses period-weighted instruction samples; non-GC figures are estimates, not exact foreground counters. Raw hardware instructions are above.
All five primary warm wall times for every querysf10-memory
sf10-disk
sf100-disk
Final delivery mergeAfter these captures, #32800 merged grouped-measure reuse into main. The delivery Main subsequently also merged #32815 allocator advice and qualified-identifier |
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? |
|
Queue requested — the merge queue status continues in this comment ↓. |
🛑 Queue command cancelledQueue requested — the merge queue status continues in this comment ↓. |
|
Coverage failure triage: run 43899386963 failed its UT producer before the UPDATE IGNORE test callback. CN bootstrap rejected TOP expression allocation The exact test passes locally in scalar Only the failed producer and dependent checks were retried (attempt 2) on unchanged PR head |
|
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: b395d893f5eaf633b5fc603a90296026dbea4dfd
Assessment: approve
The focused fusion preserves canonical key identity and generic publication while reusing the existing compact index, scratch and lifecycle. The documented tiny-control setup cost is accepted. No actionable correctness or design defect remains.
Model: gpt-6.1-sol / max
Session: 01a1e395-a6d9-7ad1-bf20-81f1c6210100 · slot 2 · generation 0
Validation:
-
Reviewed the complete three-file delta, all six discussion entries and linked issue context; traced fallback, admission, publication, spill and reset/free.
-
Preflight passed. The extracted production decoder matched the frozen baseline in 177,801 cases, plus all 257 domain identities, using the supplied test-exec.
-
Verified benchmark source compatibility and reconciled all 22 reported query medians and Totals across three configurations.
-
Reused frozen current-head CI success for build, UT, coverage, SCA and multi-CN BVT. Saved the discussion ledger and reconciled local receipts/logs in validation-index.json.
Limitations:
-
Full native/package tests and SQL benchmarks were not rerun locally; raw author/CI execution logs were not supplied. The decoder check is an internal equivalence probe.
-
Performance captures use earlier pinned binaries and one process per arm/configuration. Primary Total wall deltas remain +1.11%/+3.17%/-2.90%; the separate replay and work counters support process variation but do not establish population noninferiority. Later common allocator changes were not measured in those captures.
🛑 Pull request from fork cannot be queuedDetailsThis pull request comes from a fork, and Mergify needs the author's permission to update its branch. |
✅ Merged into
|
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30841
What this PR does / why we need it:
Fuse descriptor decoding, canonical code generation and committed-group lookup
for eligible two-column flat CHAR(1) chunks. Resolve the column descriptors once
and traverse each chunk once, writing the existing code and group-ID scratch.
Use the existing common route for single-row tuples and preserve generic
preview/commit fallback for misses and unsupported values.
Make the shared one-byte canonicalizer inline while preserving PAD SPACE, empty,
NULL and unsupported-representation behavior. Publish eligibility only after
validating the complete chunk. Preserve the existing derived-index generation,
group creation, admission, spill, reset and allocation contracts.
Design
Approved design and bounded setup-cost decision.
Validation
The existing compact lookup tests cover canonical tuples, offsets/tails, misses,
late unsupported values, allocation refusal, spill and generation/reset behavior.
The lookup implementation and typed key inputs are unchanged. Matching caller-shape
and inlining evidence is reused. The owning group package passes again on the final
main containing the common allocator advice, and configured static checks pass
on the delivery baseline.
All 18 real caller-shape controls and equal-work instruction/cycle controls are
retained, including the explicitly approved fixed setup cost for tiny one-row
miss/unsupported cases. This tradeoff remains conditional on the TPC-H gate.
The fresh local comparison covers all 22 queries and Total at SF10 memory/disk
and SF100 disk, with one process per arm/configuration, one excluded cold suite
and five profiled warm suites. The original timing flags are retained and discussed alongside an unscored
identical-main/compact/identical-main replay with TLB/cache counters. No stable
introduced control-query work or delay was confirmed; one-process measurements
do not establish population noninferiority. The mandatory full repository pre-push static gate passes with pinned tools
in the default CI build mode. Full tables and limitations are in separate comments.