From 4fa136ef1377b72f4a3f73823b0b6ac82d382177 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 --- HISTORY.md | 1 + memtable/hash_spdb_rep.cc | 2 +- tools/db_bench_tool.cc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 100ac70d8..efef07169 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,7 @@ ### New Features ### Enhancements +* set the default bucket size of hashspdb to be 400k for best memory use and performance (#854) ### Bug Fixes * LOG Consistency:Display the pinning policy options same as block cache options / metadata cache options (#804). 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");