-
Notifications
You must be signed in to change notification settings - Fork 128
gpu compatible write strategy, move compact strategy to use btrblocks with zstd and pco #6322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes
|
| /// Configure a write strategy that emits only CUDA-compatible encodings. | ||
| /// | ||
| /// This keeps the default write layout pipeline, but: | ||
| /// - Restricts flat-layout normalization to [`GPU_ALLOWED_ENCODINGS`] | ||
| /// - Configures BtrBlocks to exclude schemes without CUDA kernel support | ||
| #[cfg(feature = "zstd")] | ||
| pub fn with_cuda_compatible_encodings(mut self) -> Self { | ||
| let btrblocks = BtrBlocksCompressorBuilder::default() | ||
| .exclude_int([IntCode::Sparse, IntCode::Rle]) | ||
| .exclude_float([FloatCode::AlpRd, FloatCode::Rle, FloatCode::Sparse]) | ||
| // Keep string schemes disabled in btrblocks; when `zstd` feature is enabled, we | ||
| // separately encode string/binary leaves as Zstd (without dictionaries). | ||
| .exclude_string([ | ||
| StringCode::Dict, | ||
| StringCode::Fsst, | ||
| StringCode::Constant, | ||
| StringCode::Sparse, | ||
| ]) | ||
| .build(); | ||
|
|
||
| self.compressor = Some(Arc::new(GpuCompatibleCompressor::new(btrblocks))); | ||
| self.allow_encodings = Some((*GPU_ALLOWED_ENCODINGS).clone()); | ||
| self | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be done by the caller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it can, but now compact also doesn't use a custom compressor so it is useful to keep these as convenience imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its the cfg zstd new (is that the cuda zstd) or regular
Benchmarks: PolarSignals ProfilingSummary
Detailed Results Table
|
Benchmarks: TPC-H SF=1 on NVMESummary
Detailed Results Table
|
Benchmarks: FineWeb NVMeSummary
Detailed Results Table
|
Benchmarks: TPC-DS SF=1 on NVMESummary
Detailed Results Table
|
Benchmarks: TPC-H SF=1 on S3Summary
Detailed Results Table
|
Benchmarks: TPC-H SF=10 on NVMESummary
Detailed Results Table
|
Benchmarks: FineWeb S3Summary
Detailed Results Table
|
Benchmarks: Statistical and Population GeneticsSummary
Detailed Results Table
|
Benchmarks: TPC-H SF=10 on S3Summary
Detailed Results Table
|
Benchmarks: Clickbench on NVMESummary
Detailed Results Table
|
| &SequenceScheme, | ||
| &RLE_INTEGER_SCHEME, | ||
| #[cfg(feature = "pco")] | ||
| &PcoScheme, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not must not be in the default
joseph-isaacs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure teh default strategy doesn't have PCO or zstd
|
default is filtering out pco and zstd |
| int_schemes: ALL_INT_SCHEMES | ||
| .iter() | ||
| .copied() | ||
| .filter(|s| s.code() != IntCode::Pco) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is currently where we exclude pco and zstd from the default
| int_schemes: ALL_INT_SCHEMES | ||
| .iter() | ||
| .copied() | ||
| .filter(|s| s.code() != IntCode::Pco) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we have ALL_DEFAULT_SCEHEMS? next to all schemes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its just people will forget to omit other schemes
joseph-isaacs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the default schemes and we can merge
joseph-isaacs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to fix the python test, this shouldn't change
File "../vortex-python/python/vortex/io.py", line ?, in default
Failed example:
os.path.getsize('tiny.vortex')
Expected:
55116
Got:
55316
Signed-off-by: Onur Satici <onur@spiraldb.com>
Signed-off-by: Onur Satici <onur@spiraldb.com>
f4f3811 to
f475bdb
Compare
|
the test failure is because the tiny vortex file in the test doesn't accommodate for the fastlanes 1024 byte padding that would be included. We should be accommodating that on larger samples because we sample with windows that are multiples of 1024, but for small arrays FoR compression estimation would overshoot, causing the compact compressor to pick FoR instead of Pco. That is why the test file is 200 byte larger, it did pick FoR instead of Pco for the zones child, and with the padding FoR ended up being larger that the primitive array so we fell back to primitive |
|
Just noticed this change because of a conflict - I think this design is a bit suboptimal since Pco+Zstd will ~always be the strongest encodings for their respective data types, so here we're 1. adding a small risk that sampling will randomly choose something weaker based a small portion of the data (e.g. I think @onursatici's last comment is exactly this problem) and 2. increasing compression time somewhat. I think instead of simply adding encodings, we should have different sets depending on the compression strength the user wants. |
No description provided.