...
set_max_background_jobs(5);
固定转账提升3%
创建账号提升1%
3. 打开统计
统计据说有一点性能损失,主要是为了跟踪每个columnfamily的一些指标数据
db_opts.enable_statistics();
打开后我测试中有一次segfault了,原因不明
4. set_row_cache
cache设置成这个
可能与lru cache冲突
// let cache = Cache::new_lru_cache(2 * 1024 * 1024 * 1024); // db_opts.set_row_cache(&cache.unwrap());
目前看起来写的性能下降了
对基于读的性能场景可能性能提升
...
5. compress
目前我们使用的压缩方式是
cf_opts.set_compression_type(rocksdb::DBCompressionType::Lz4);
...