Repository navigation
Layout 16: builds end at four segments, streaming merges; an x86-64-v4 build behind a loader - #107
Merged
Merged
Conversation
…4 build behind a loader
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.
Layout 16, from
tinshape/perf-integrate16(f282037). Indexes built at layout 15 need aREINDEX.Builds end at four segments; merges stream (page layout 16).
initial_segment_countsegments of about equal size: 4 by default, as TIN's default build gives. Each is at most 16 GiB; a small index gets fewer, so that each holds at least 1 GiB.initial_segment_countis now honored as an index option. An unsettarget_segment_countfollows it, as TIN's does.max_merged_segment_size(2000 MB unset, as TIN's) and leave a build's larger segments alone. VACUUM reads a segment's documents without reading the segment.tnsmerge(bench) merges dumped segments offline;tnsreplayprints a census.x86-64 loader.
stannum.sopicks the v4 build on CPUs with all of x86-64-v4 (and an OS that saves the AVX-512 registers), and the baseline elsewhere.script/install-releasebuilds and installs all three files.STANNUM_LOADER_LEVELforces a build;SHOW stannum.cpu_levelreports the running one. aarch64 is unchanged.--target-cpu x86-64builds the baseline alone.pipefail, andscript/rustc-cpu-levelis copied into the image, which every v4/loader image build needed.Term lookups by an eight-byte key.
memcmp.Group frontiers bounded without branches.
scoredisjunctions +2.1% per core cycle,full_scoredisjunctions +0.9%.Tooling: a paired-core (hyperthread) A/B gate (
devbox-htpair-ab.sh,htpair_gate.py,htpair_summary.py),devbox-seg4-ab.sh,devbox-loader.sh, andtnsreplaypinning.PGO retrained on layout 16: aarch64 (7ad38b4), x86_64 and the new x86_64-v4 profile (f282037). Each answered 3762 + 3762 queries with 0 differences.
Answers. Scores are bit-identical over the 150M trace (1228 / 1253 / 1252 equal, 0 different;
--fullbyte-identical in all 3 styles), on aarch64 and on x86. Ranked oracle 3762/3762. Conformance against TIN 1.0.3 and 1.0.4 is unchanged, 0 FAIL.150M database: built in 159.7 min (layout 15: 166.5, on a loaded Mac), 4 segments (layout 15: 13), index 36.41 GB (+0.36%). The segments aren't balanced yet (7.1 / 15.5 / 7.0 / 6.7 GB): the 15.5 GB one comes from a tier merge during the build. This is a follow-up.
x86 replay, Sapphire Rapids (m7i.4xlarge), paired-core gate, 3 rotated rounds, each layout on its own dump, answers the same every round. Queries per core cycle:
Instructions per query fell 2.9–12.8%.
Local M4 campaign (new layout-16 database, run with the CI runners idle). QPS score /
full_score, change against layout 15 (d07348e):full_scoredisjunctions and mixed are 3.5–3.7% slower locally, although the x86 replay shows full disj +2.5%. This will be checked on i7i before acting on it.Verified locally:
script/test-all fullgreen (pgrx 227 passed), clippy pg17/pg18 and fmt clean, x86 tests under Rosetta (scalar and AVX2), PGO 40/40 on aarch64. The strict loader image with both x86 profiles has not been built on a box yet.