From 75755830d45c44cdec14edf7340694850ea6ab29 Mon Sep 17 00:00:00 2001 From: Ayelet Shani Date: Sun, 3 Mar 2024 13:48:24 +0200 Subject: [PATCH] 854: set the default bucket size of hashspdb to be 400k for best memory use and performance --- memtable/hash_spdb_rep.cc | 2 +- tools/db_bench_tool.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/memtable/hash_spdb_rep.cc b/memtable/hash_spdb_rep.cc index 44858746d..6f8bcd666 100644 --- a/memtable/hash_spdb_rep.cc +++ b/memtable/hash_spdb_rep.cc @@ -554,7 +554,7 @@ static std::unordered_map hash_spdb_factory_info = class HashSpdbRepFactory : public MemTableRepFactory { public: - explicit HashSpdbRepFactory(size_t hash_bucket_count = 1000000, + explicit HashSpdbRepFactory(size_t hash_bucket_count = 400000, bool use_merge = true) { options_.hash_bucket_count = hash_bucket_count; options_.use_merge = use_merge; diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 4c965d4e4..0dc92def7 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -1910,7 +1910,7 @@ DEFINE_int64(multiread_stride, 0, DEFINE_bool(multiread_batched, false, "Use the new MultiGet API"); DEFINE_string(memtablerep, "hash_spdb", ""); -DEFINE_int64(hash_bucket_count, 1000000, "hash bucket count"); +DEFINE_int64(hash_bucket_count, 400000, "hash bucket count"); DEFINE_bool(use_plain_table, false, "if use plain table instead of block-based table format"); DEFINE_bool(use_cuckoo_table, false, "if use cuckoo table format");