Skip to content

Commit

Permalink
trigger manual compaction after 5000 datasets, increase zstd train bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Dec 30, 2024
1 parent 2e0626b commit 7d252fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/core/src/index/revindex/disk_revindex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,11 @@ impl RevIndex {
info!("Processed {} reference sigs", i);
}

/*
if i % 5000 == 0 && i > 0 {
info!("Triggering manual compaction");
index.compact();
info!("Finished manual compaction");
}
*/

Some((
index.map_hashes_colors(dataset_id as Idx),
Expand Down
2 changes: 1 addition & 1 deletion src/core/src/storage/rocksdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub(crate) fn db_options() -> rocksdb::Options {
// opts.optimize_universal_style_compaction();

opts.set_bottommost_compression_type(rocksdb::DBCompressionType::Zstd);
opts.set_bottommost_zstd_max_train_bytes(0, true);
opts.set_bottommost_zstd_max_train_bytes(1024 << 10, true); // 1MiB

opts
}

0 comments on commit 7d252fa

Please sign in to comment.