From 0fe2673791cb0faba1bdc3837ab129827e56d93a Mon Sep 17 00:00:00 2001 From: abbycin Date: Wed, 18 Mar 2026 11:45:48 +0800 Subject: [PATCH] shrink memtable/arena limit --- rocksdb/main.cpp | 10 +++++----- src/main.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rocksdb/main.cpp b/rocksdb/main.cpp index 4665022..cdeb4a1 100644 --- a/rocksdb/main.cpp +++ b/rocksdb/main.cpp @@ -779,7 +779,7 @@ int main(int argc, char *argv[]) { cfo.min_blob_size = args.blob_size; cfo.disable_auto_compactions = true; cfo.write_buffer_size = 64 << 20; - cfo.max_write_buffer_number = 128; + cfo.max_write_buffer_number = 16; auto cache = rocksdb::NewLRUCache(3 << 30); rocksdb::BlockBasedTableOptions table_options{}; @@ -1009,10 +1009,10 @@ int main(int argc, char *argv[]) { return 1; } - fmt::println( - "engine=rocksdb workload={} mode={} durability={} threads={} total_op={} ok_op={} err_op={} ops={} p99_us={} result_file={}", - row.workload_id, row.mode, durability_str(row.durability_mode), row.threads, row.total_op, row.ok_op, - row.err_op, static_cast(row.ops), row.quantiles.p99_us, args.result_file); + fmt::println("engine=rocksdb workload={} mode={} durability={} threads={} total_op={} ok_op={} err_op={} ops={} " + "p99_us={} result_file={}", + row.workload_id, row.mode, durability_str(row.durability_mode), row.threads, row.total_op, row.ok_op, + row.err_op, static_cast(row.ops), row.quantiles.p99_us, args.result_file); delete handle; delete db; diff --git a/src/main.rs b/src/main.rs index e20ac06..dffe324 100644 --- a/src/main.rs +++ b/src/main.rs @@ -716,7 +716,7 @@ fn main() { opt.max_log_size = 1 << 30; opt.wal_buffer_size = 64 << 20; opt.wal_file_size = 128 << 20; - opt.default_arenas = 128; + opt.default_arenas = 16; opt.gc_timeout = 600 * 1000; opt.gc_eager = false; opt.data_garbage_ratio = 50;