perf[vortex-btrblocks]: remove listview expansion ratio#6530
Merged
perf[vortex-btrblocks]: remove listview expansion ratio#6530
Conversation
Contributor
Polar Signals Profiling ResultsLatest Run
Previous Runs (2)
Powered by Polar Signals Cloud |
Contributor
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
Contributor
Benchmarks: PolarSignals ProfilingSummary
Detailed Results Table
|
Contributor
Benchmarks: TPC-H SF=1 on NVMESummary
Detailed Results Table
|
Contributor
Benchmarks: FineWeb NVMeSummary
Detailed Results Table
|
Contributor
Benchmarks: TPC-H SF=1 on S3Summary
Detailed Results Table
|
Contributor
Benchmarks: TPC-DS SF=1 on NVMESummary
Detailed Results Table
|
Contributor
Benchmarks: TPC-H SF=10 on NVMESummary
Detailed Results Table
|
Contributor
Benchmarks: FineWeb S3Summary
Detailed Results Table
|
Contributor
Benchmarks: Statistical and Population GeneticsSummary
Detailed Results Table
|
Contributor
Benchmarks: TPC-H SF=10 on S3Summary
Detailed Results Table
|
Contributor
Benchmarks: Clickbench on NVMESummary
Detailed Results Table
|
joseph-isaacs
approved these changes
Feb 17, 2026
Contributor
joseph-isaacs
left a comment
There was a problem hiding this comment.
This seems okay, maybe we could follow up with a benchmark in crate comparing this?
Contributor
|
I think we should make this pluggable so not PR are needed here too |
Contributor
Author
|
Yes, happy to add a benchmark before merging |
Contributor
Author
|
Done. I added a benchmark with a relatively complex nested schema and some overlap. Before: After: |
eed7107 to
68fc292
Compare
The initial thinking here was to calculate the "cost" of expanding the listview elements when converting to a list. Specifically, we would choose listview when the elements expand to > 150%. However, we didn't give much importance to the fact that price of *not* converting to list is just writing the sizes (32KB per 8192 rows). In practice, we really want to understand not the *count* of expanded elements, but their sizes. As long they expand to <32KB, list should be preferred in an ideal world. So no fixed threshold is correct. It's too high for long lists with complex types and too low for short lists with small elements. Additionally, I ran into this problem running listview compression on a real-world workflow and the cost of non-zctl listview -> list is extremely high. Given all this, I think the pragmatic way forward is to simplify the list vs listview decision and only write list if the listview is zctl. Signed-off-by: Alfonso Subiotto Marques <alfonso.subiotto@polarsignals.com>
Signed-off-by: Alfonso Subiotto Marques <alfonso.subiotto@polarsignals.com>
68fc292 to
e1c2eaa
Compare
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.
The initial thinking here was to calculate the "cost" of expanding the listview elements when converting to a list. Specifically, we would choose listview when the elements expand to > 150%. However, we didn't give much importance to the fact that price of not converting to list is just writing the sizes (32KB per 8192 rows).
In practice, we really want to understand not the count of expanded elements, but their byte sizes. As long they expand to <32KB (if 8192 rows), list should be preferred in an ideal world. So no fixed threshold is correct. It's too high for long lists with complex types and too low for short lists with small elements.
Additionally, I ran into this problem running listview compression on a real-world workflow and the cost of non-zctl listview -> list is extremely high.
Given all this, I think the pragmatic way forward is to simplify the list vs listview decision and only write list if the listview is zctl.
Does this PR closes an open issue or discussion?
No
What changes are included in this PR?
See commit message/PR description
What is the rationale for this change?
Removing an inexact calculation that could cause costly side-effects
How is this change tested?
Existing tests
Are there any user-facing changes?
WRT to the latest release, this change will write ListView to disk when List was previously written. WRT to the previous commit, ListView will be written more often.