mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-22 11:39:35 +00:00
Use lz4 instead of zstd for the DB
zstd was recommended for the base layer only, due to its CPU requirements. That was a misreading on mhy behalf. lz4 gets ~5% better compression than snappy with ~30% faster performance. zstd does ~25% better than lz4 yet at ~30% of the performance.
This commit is contained in:
parent
64c309f8db
commit
6d5851a9ee
3 changed files with 3 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -4713,8 +4713,8 @@ dependencies = [
|
|||
"glob",
|
||||
"libc",
|
||||
"libz-sys",
|
||||
"lz4-sys",
|
||||
"tikv-jemalloc-sys",
|
||||
"zstd-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -13,7 +13,7 @@ all-features = true
|
|||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[dependencies]
|
||||
rocksdb = { version = "0.21", default-features = false, features = ["zstd"], optional = true }
|
||||
rocksdb = { version = "0.21", default-features = false, features = ["lz4"], optional = true }
|
||||
|
||||
[features]
|
||||
rocksdb = ["dep:rocksdb"]
|
||||
|
|
|
@ -37,6 +37,6 @@ pub type RocksDB = Arc<TransactionDB<SingleThreaded>>;
|
|||
pub fn new_rocksdb(path: &str) -> RocksDB {
|
||||
let mut options = Options::default();
|
||||
options.create_if_missing(true);
|
||||
options.set_compression_type(DBCompressionType::Zstd);
|
||||
options.set_compression_type(DBCompressionType::Lz4);
|
||||
Arc::new(TransactionDB::open(&options, &Default::default(), path).unwrap())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue