perf(index): optional uncompressed index - #118
Merged
Merged
Conversation
…ecompression pass) Adds --index-uncompressed: stores the raw capnp payload after the param header instead of ZSTD frames, so IndexReader mmaps the file and hands the bytes straight to capnp (zero-copy) rather than decompressing the whole index into a heap buffer on every load. The header's byte 26 records the format; old and compressed indexes (flag 0) are unaffected, so this is fully backward compatible and off by default. A/B (page cache warm, byte-identical placement at -t1): TB place -t8 2.13 -> 1.69s (-21%) -t16 1.82 -> 1.41s (-23%) SARS place -t8 1.49 -> 1.39s (-7%) -t16 1.31 -> 1.25s (-5%) Bigger at higher thread counts: placement compute is fast there, so the eliminated decompression pass is a larger fraction and page faults parallelize across threads. Neutral at -t1. Trade-off: larger on disk (TB 230->462MB, SARS 8->30MB) and cold first-load reads more bytes, so it targets repeated placement against a resident index -- hence opt-in. Placement output is byte-identical at -t1; the -t8 last-digit wobble is pre-existing parallel float-reduction non-determinism (the compressed index alone gives different values run-to-run). unit + e2e + examples pass.
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.
Adds an opt-in
--index-uncompressedflag for faster (mmap) loading. Probably only useful for big panmans (sars 8M).