Repository navigation
Sub-range codes for full_score conjunctions; the densest run of groups walks first (page layout 18) - #109
Merged
Conversation
…s walked first (page layout 18)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From
tinshape/perf-integrate18(824bb83). Page layout 18: indexes of an earlier layout must be rebuilt (REINDEX). Layout 18 is layout 16 plus sub-range codes; 17 was never shipped.Sub-range codes for dense terms (loop/subrange).
full_scoreconjunction's group with at least 32 candidates bounds each candidate word by its scoring terms' codes, summed in the scorer's order. It clears the words the bar cuts before reading their buckets. Other walks read no code.verify_segmentchecks every grid posting against its code.The densest run of groups walks first (loop/shortfirst, with loop/thetaseed and loop/tail25's tooling).
--short-first 0vs 400): −3.1% over all forms, every style lower, tails −5 to −9%.Dropped by the server pair (on trial).
Tooling.
tnsreplay:--mmap, per-querypinqcounts andins/cyccolumns,--plan STYLE:MODE:@FILE,--order matches|density,--short-first,--lead,--heap-perm,--prepass,--seed-rank,--rows-at,--group-stats, and a sub-range census.htpair_gate.py --tail-gate; the fixed tail-25 sets inbenchmarks/aws/tail/;tnssubsize.dump-segments.pyreads layout 18 (it was pinned at 16).devbox.sh --diskgoes up to 400 GiB.PGO, retrained on this tree: x86_64 and x86_64-v4 (4c745a5, trained over the layout-18 database), and aarch64 (824bb83). Score answers differ from pg-ranked in 0 cases, and
full_scoreanswers match i17's trainings at both levels. PGO coverage is 40 of 40 for x86-64 and for x86-64-v4 in the strict default (loader) image, and 40 of 40 on aarch64.Answers.
tnsreplay --mmapon a fresh dump of the shipped layout: 1228 / 1253 / 1252 equal, 0 different.--fullis byte-identical to f0962a8 in all 3 styles. The combined layout with length codes gave the same.--expect(v4 + replay PGO, with length codes) gave 0 different.x86 replay, Sapphire Rapids (m7i.4xlarge), paired-core gate, 3 rounds, each arm built with its own replay PGO profile (x86-64-v4). i18 includes length codes and the cap, each arm runs on its own dump, and tail-25 is included. Queries per core cycle, i18 vs i17:
Server pair, Sapphire Rapids (PG 18.6 PGDG on two hyperthreads of one core, 2 clients, fixed seeded passes, 3 rotated rounds). Loader builds without PGO on every arm; the v4 build was picked each time. Each arm used its own 150M database. Throughput vs i17:
The shipped tree is the middle column minus the cap; the cap measured at −0.17%. EXPLAIN MiB/query vs i17: score −1.2 / −2.2 / −2.6% and full −1.3 / −5.8 / −2.5% (conj / disj / phrase).
Local M4 campaign (new layout-18 database, strict aarch64 PGO image, runner CPU 0% in every run). QPS score /
full_score, change against i17 (887c5e8, layout-16 database):150M databases (local, mock-build v2):
Open items
Verified locally:
script/test-all fullgreen (pgrx 228 passed), clippy pg17/pg18 and fmt clean, x86 tests under Rosetta (no AVX, AVX scalar, AVX2).