Skip to content

Commit

Permalink
Get faster compression level --fast=4
Browse files Browse the repository at this point in the history
As per https://github.com/facebook/zstd/tree/dev?tab=readme-ov-file#benchmarks
Level=4 offers faster compression 710MB/s vs. 670 MB/s
  • Loading branch information
ksolana committed Sep 3, 2024
1 parent 22b823c commit f717078
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/src/snapshot_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1083,8 +1083,9 @@ fn archive_snapshot(
encoder.finish().map_err(E::FinishEncoder)?;
}
ArchiveFormat::TarZstd => {
// Compression level of 1 is optimized for speed.
let mut encoder =
zstd::stream::Encoder::new(archive_file, 0).map_err(E::CreateEncoder)?;
zstd::stream::Encoder::new(archive_file, 1).map_err(E::CreateEncoder)?;
do_archive_files(&mut encoder)?;
encoder.finish().map_err(E::FinishEncoder)?;
}
Expand Down

0 comments on commit f717078

Please sign in to comment.