Experiment: optimize compressor selection for scan time#8780
Experiment: optimize compressor selection for scan time#8780connortsui20 wants to merge 1 commit into
Conversation
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
Benchmarks: PolarSignals ProfilingVortex (geomean): 0.912x ➖ How to read Verdict and Engines
datafusion / vortex-file-compressed (0.912x ➖, 6↑ 0↓)
File Size Changes (1 files changed, +0.2% overall, 1↑ 0↓)
Totals:
|
Benchmarks: FineWeb NVMeVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.943x ➖, 3↑ 3↓)
datafusion / vortex-compact (1.016x ➖, 1↑ 2↓)
datafusion / parquet (1.010x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (0.908x ➖, 3↑ 0↓)
duckdb / vortex-compact (1.119x ❌, 0↑ 1↓)
duckdb / parquet (1.017x ➖, 0↑ 0↓)
File Size Changes (2 files changed, +13.8% overall, 2↑ 0↓)
Totals:
|
Benchmarks: TPC-H SF=1 on NVMEVerdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.053x ➖, 0↑ 2↓)
datafusion / vortex-compact (1.028x ➖, 0↑ 0↓)
datafusion / parquet (1.050x ➖, 1↑ 6↓)
datafusion / arrow (1.071x ➖, 0↑ 3↓)
duckdb / vortex-file-compressed (1.045x ➖, 0↑ 1↓)
duckdb / vortex-compact (1.000x ➖, 2↑ 2↓)
duckdb / parquet (1.057x ➖, 0↑ 3↓)
duckdb / duckdb (1.052x ➖, 0↑ 2↓)
File Size Changes (18 files changed, +8.9% overall, 11↑ 7↓)
Totals:
|
Benchmarks: TPC-DS SF=1 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.965x ➖, 21↑ 3↓)
datafusion / vortex-compact (0.942x ➖, 31↑ 8↓)
datafusion / parquet (0.948x ➖, 22↑ 0↓)
duckdb / vortex-file-compressed (1.014x ➖, 4↑ 10↓)
duckdb / vortex-compact (0.810x ✅, 67↑ 1↓)
duckdb / parquet (1.021x ➖, 0↑ 2↓)
duckdb / duckdb (0.990x ➖, 0↑ 0↓)
File Size Changes (48 files changed, +12.2% overall, 22↑ 26↓)
Totals:
|
Benchmarks: FineWeb S3Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.075x ➖, 0↑ 1↓)
datafusion / vortex-compact (1.133x ➖, 0↑ 2↓)
datafusion / parquet (1.012x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (1.145x ➖, 0↑ 1↓)
duckdb / vortex-compact (0.950x ➖, 0↑ 0↓)
duckdb / parquet (0.986x ➖, 0↑ 0↓)
|
Benchmarks: Statistical and Population GeneticsVerdict: No clear signal (low confidence) How to read Verdict and Engines
duckdb / vortex-file-compressed (0.973x ➖, 2↑ 0↓)
duckdb / vortex-compact (0.904x ➖, 1↑ 2↓)
duckdb / parquet (0.988x ➖, 0↑ 0↓)
File Size Changes (2 files changed, +13.9% overall, 2↑ 0↓)
Totals:
|
Benchmarks: Clickbench Sorted on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.032x ➖, 1↑ 3↓)
datafusion / parquet (1.007x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (1.059x ➖, 1↑ 3↓)
duckdb / parquet (0.999x ➖, 0↑ 0↓)
duckdb / duckdb (1.016x ➖, 0↑ 0↓)
File Size Changes (201 files changed, +16.3% overall, 167↑ 34↓)
Totals:
|
Benchmarks: TPC-H SF=10 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.995x ➖, 0↑ 0↓)
datafusion / vortex-compact (0.950x ➖, 5↑ 0↓)
datafusion / parquet (1.020x ➖, 0↑ 1↓)
datafusion / arrow (1.061x ➖, 0↑ 5↓)
duckdb / vortex-file-compressed (0.986x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.021x ➖, 3↑ 6↓)
duckdb / parquet (0.987x ➖, 1↑ 0↓)
duckdb / duckdb (1.012x ➖, 0↑ 0↓)
File Size Changes (48 files changed, +8.9% overall, 39↑ 9↓)
Totals:
|
Benchmarks: Clickbench on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.024x ➖, 1↑ 6↓)
datafusion / parquet (1.045x ➖, 0↑ 9↓)
duckdb / vortex-file-compressed (0.982x ➖, 2↑ 1↓)
duckdb / parquet (0.999x ➖, 0↑ 0↓)
duckdb / duckdb (0.997x ➖, 0↑ 0↓)
File Size Changes (201 files changed, +24.2% overall, 199↑ 2↓)
Totals:
|
Benchmarks: TPC-H SF=1 on S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.875x ➖, 3↑ 2↓)
datafusion / vortex-compact (0.911x ➖, 0↑ 0↓)
datafusion / parquet (1.075x ➖, 0↑ 5↓)
duckdb / vortex-file-compressed (0.972x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.972x ➖, 0↑ 0↓)
duckdb / parquet (0.978x ➖, 0↑ 0↓)
|
Benchmarks: Random AccessVortex (geomean): 1.044x ➖ How to read Verdict and Engines
unknown / unknown (1.030x ➖, 1↑ 2↓)
|
Benchmarks: Appian on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.917x ➖, 4↑ 0↓)
datafusion / parquet (0.943x ➖, 2↑ 0↓)
duckdb / vortex-file-compressed (0.950x ➖, 2↑ 0↓)
duckdb / parquet (0.987x ➖, 0↑ 0↓)
duckdb / duckdb (0.961x ➖, 1↑ 0↓)
File Size Changes (19 files changed, +6.8% overall, 3↑ 16↓)
Totals:
|
Benchmarks: TPC-H SF=10 on S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.969x ➖, 0↑ 0↓)
datafusion / vortex-compact (0.946x ➖, 1↑ 1↓)
datafusion / parquet (0.943x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed (0.967x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.954x ➖, 0↑ 0↓)
duckdb / parquet (0.952x ➖, 0↑ 0↓)
|
Benchmarks: CompressionVortex (geomean): 1.037x ➖ How to read Verdict and Engines
unknown / unknown (1.025x ➖, 3↑ 11↓)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 521d01e2fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if [ "${{ inputs.mode }}" != "pr" ]; then | ||
| packages+=(--bin lance-bench) | ||
| features+=(--features unstable_encodings) | ||
| fi | ||
| cargo build "${packages[@]}" --profile release_debug --features unstable_encodings | ||
| cargo build "${packages[@]}" "${features[@]}" --profile release_debug |
There was a problem hiding this comment.
Keep benchmark feature sets aligned
When inputs.mode == 'pr', features stays empty here, but this workflow's compare step still downloads data.json.gz from the develop benchmark results, and develop mode takes this same branch the other way and adds --features unstable_encodings. That means PR SQL benchmark comments now compare stable-encoding PR binaries against unstable-encoding develop baselines, so unrelated PRs can be reported as faster/slower because of the feature-policy difference rather than their changes. Please either produce a matching stable baseline or keep the PR and develop feature sets aligned for comparisons.
Useful? React with 👍 / 👎.
| /// [`SizeCost`] because the scan calibration has not been validated for those schemes. | ||
| /// [`ReadTimeCost`](vortex_compressor::cost::ReadTimeCost) is available for deterministic | ||
| /// sequential-scan objectives that combine estimated I/O and decode time. | ||
| pub fn with_cost_model(mut self, cost_model: Arc<dyn CostModel>) -> Self { |
There was a problem hiding this comment.
Re-export Candidate with the custom cost API
This new public hook lets downstream users pass a custom CostModel, but a crate that depends only on vortex-btrblocks or vortex::compressor cannot implement that trait because CostModel::cost takes Candidate<'_> and neither facade re-exports Candidate. In that scenario the method signature has no usable public path without adding a lower-level vortex-compressor dependency, which undercuts the custom model API; please re-export Candidate alongside CostModel through the same public modules.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
ok yeah please make that change for me
521d01e to
a1f9c13
Compare
cb878e4 to
43f6c42
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
a1f9c13 to
4e73ee6
Compare
Merging this PR will improve performance by 59.92%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | cuda/bitpacked_u8/unpack/3bw[100M] |
646.3 µs | 299.2 µs | ×2.2 |
| ⚡ | WallTime | cuda/bitpacked_patched_u8/unpack/1%[100M] |
768.9 µs | 380.4 µs | ×2 |
| ⚡ | WallTime | cuda/bitpacked_patched_u8/unpack/10%[100M] |
828.6 µs | 479.9 µs | +72.64% |
| ⚡ | WallTime | cuda/bitpacked_patched_u16/unpack/1%[100M] |
712.3 µs | 594.9 µs | +19.74% |
| ⚡ | WallTime | cuda/bitpacked_patched_u16/unpack/10%[100M] |
831 µs | 717.2 µs | +15.87% |
| 🆕 | Simulation | bitpacked_decode |
N/A | 2.6 ms | N/A |
| 🆕 | Simulation | bitpacked_eq_fill |
N/A | 2.4 ms | N/A |
| 🆕 | Simulation | bitpacked_filter_10pct |
N/A | 3.7 ms | N/A |
| 🆕 | Simulation | dict_decode |
N/A | 39.3 ms | N/A |
| 🆕 | Simulation | dict_eq |
N/A | 4.5 ms | N/A |
| 🆕 | Simulation | dict_like |
N/A | 62.4 ms | N/A |
| 🆕 | Simulation | fsst_decode |
N/A | 28.2 ms | N/A |
| 🆕 | Simulation | fsst_eq |
N/A | 4.3 ms | N/A |
| 🆕 | Simulation | fsst_like |
N/A | 16.4 ms | N/A |
| 🆕 | Simulation | run_bitpacked_decode |
N/A | 3.1 ms | N/A |
| 🆕 | Simulation | run_bitpacked_eq |
N/A | 1.9 ms | N/A |
| 🆕 | Simulation | run_bitpacked_filter_10pct |
N/A | 4.1 ms | N/A |
| 🆕 | Simulation | run_scan_cost_decode |
N/A | 6.4 ms | N/A |
| 🆕 | Simulation | run_scan_cost_eq |
N/A | 9.5 ms | N/A |
| 🆕 | Simulation | run_scan_cost_filter_10pct |
N/A | 4.9 ms | N/A |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing codex/cost-model-query-performance (4e73ee6) with ct/compressor-cost-model (43f6c42)
Footnotes
-
9 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Codecov Report❌ Patch coverage is ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Warning
Experimental: the calibration and PR benchmark feature policy need broader workload validation before this is production-ready.
Summary
ReadTimeCost: estimated read time is encoded bytes divided by effective bandwidth, plus a per-scheme decode charge.ScanCostpreset and use it by default for the stable BtrBlocks scheme pool.SizeCostwhenunstable_encodingsis enabled; the same calibration regressed with that scheme pool.This is stacked on #8753.
Results
TPC-H SF1, DataFusion/Vortex, all 22 queries, two opposite-order runs with 30 iterations each:
Largest improvements were Q4 (-8.86%), Q21 (-4.60%), and Q6 (-3.78%). Q11 regressed by 2.30%.
With unstable encodings enabled, the initial calibration was 1.1% slower in geomean. That is why unstable builds retain
SizeCostand PR benchmarking exercises the stable pool.The focused compression timing sample was blocked by the local Public BI checkout failing its repository update, so this PR does not claim compression-job timing results.