Repository navigation
perf: bound multivector index build reads by bytes - #11809
Merged
Xuanwo merged 1 commit intoDec 2, 2026
Merged
Conversation
Contributor
Author
|
Peak heap and time of an IVF_PQ build, 244 partitions on every build, local disk. The column is
Recall@10 on the 200-row table, single-vector queries, 100 queries, three builds each. The training sample goes from 1.28M vectors (128 whole rows) to the 62k asked for.
|
wkalt
force-pushed
the
ticket/oss-3288/multivector-build-memory
branch
from
December 2, 2026 20:00
6d11d52 to
1c60439
Compare
Several steps of a multivector index build read a fixed number of rows, which for rows holding thousands of vectors is most of the table: the vectors-per-row estimate took 64 rows, the trainable-vector count scanned 1024 rows a batch, and the shuffle read 64 rows a batch on every core and transformed each row whole. They now size their reads in bytes, and the shuffle slices a row larger than one fetch. A training sample was at least 128 whole rows, however few vectors were asked for. For rows of 1 MiB or more it is now the vectors asked for, drawn in equal shares from up to 64 rows with one row in memory at a time. This costs a read of those rows (up to 2 GiB) for each sample.
wkalt
force-pushed
the
ticket/oss-3288/multivector-build-memory
branch
from
December 2, 2026 21:34
1c60439 to
c8a3894
Compare
Xuanwo
approved these changes
Dec 2, 2026
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.
Several steps of a multivector index build read a fixed number of rows, which for rows holding thousands of vectors is most of the table: the vectors-per-row estimate took 64 rows, the trainable-vector count scanned 1024 rows a batch, and the shuffle read 64 rows a batch on every core and transformed each row whole. They now size their reads in bytes, and the shuffle slices a row larger than one fetch.
A training sample was at least 128 whole rows, however few vectors were asked for. For rows of 1 MiB or more it is now the vectors asked for, drawn in equal shares from up to 64 rows with one row in memory at a time. This costs a read of those rows (up to 2 GiB) for each sample.