Switch from Snappy to LZ4 database compression (#4027)

This commit is contained in:
teor 2022-04-08 09:16:34 +10:00 committed by GitHub
parent 7faa6a26c5
commit 6fada06d20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -459,11 +459,18 @@ impl DiskDb {
opts.create_missing_column_families(true);
// Use the recommended Ribbon filter setting for all column families.
// (Ribbon filters are faster than Bloom filters in Zebra, as of April 2022.)
//
// Ribbon filters are faster than Bloom filters in Zebra, as of April 2022.
// (They aren't needed for single-valued column families, but they don't hurt either.)
block_based_opts.set_ribbon_filter(9.9);
// Use the recommended LZ4 compression type.
//
// https://github.com/facebook/rocksdb/wiki/Compression#configuration
opts.set_compression_type(rocksdb::DBCompressionType::Lz4);
// Increase the process open file limit if needed,
// then use it to set RocksDB's limit.
let open_file_limit = DiskDb::increase_open_file_limit();
let db_file_limit = DiskDb::get_db_open_file_limit(open_file_limit);