From 705ec249772e5bc1a7ff531b83548ce69250da45 Mon Sep 17 00:00:00 2001 From: Lakshmi Narayanan Sreethar Date: Fri, 10 May 2024 14:29:57 +0530 Subject: [PATCH] db/config.cc: increment components_memory_reclaim_threshold config default Incremented the components_memory_reclaim_threshold config's default value to 0.2 as the previous value was too strict and caused unnecessary eviction in otherwise healthy clusters. Fixes #18607 Signed-off-by: Lakshmi Narayanan Sreethar (cherry picked from commit 3d7d1fa72ae3682900e45a679d66690373118560) Closes #19011 --- db/config.cc | 2 +- test/boost/sstable_datafile_test.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/config.cc b/db/config.cc index e3cf28390eb4..777fe6497e16 100644 --- a/db/config.cc +++ b/db/config.cc @@ -819,7 +819,7 @@ db::config::config(std::shared_ptr exts) , unspooled_dirty_soft_limit(this, "unspooled_dirty_soft_limit", value_status::Used, 0.6, "Soft limit of unspooled dirty memory expressed as a portion of the hard limit") , sstable_summary_ratio(this, "sstable_summary_ratio", value_status::Used, 0.0005, "Enforces that 1 byte of summary is written for every N (2000 by default) " "bytes written to data file. Value must be between 0 and 1.") - , components_memory_reclaim_threshold(this, "components_memory_reclaim_threshold", liveness::LiveUpdate, value_status::Used, .1, "Ratio of available memory for all in-memory components of SSTables in a shard beyond which the memory will be reclaimed from components until it falls back under the threshold. Currently, this limit is only enforced for bloom filters.") + , components_memory_reclaim_threshold(this, "components_memory_reclaim_threshold", liveness::LiveUpdate, value_status::Used, .2, "Ratio of available memory for all in-memory components of SSTables in a shard beyond which the memory will be reclaimed from components until it falls back under the threshold. Currently, this limit is only enforced for bloom filters.") , large_memory_allocation_warning_threshold(this, "large_memory_allocation_warning_threshold", value_status::Used, size_t(1) << 20, "Warn about memory allocations above this size; set to zero to disable") , enable_deprecated_partitioners(this, "enable_deprecated_partitioners", value_status::Used, false, "Enable the byteordered and random partitioners. These partitioners are deprecated and will be removed in a future version.") , enable_keyspace_column_family_metrics(this, "enable_keyspace_column_family_metrics", value_status::Used, false, "Enable per keyspace and per column family metrics reporting") diff --git a/test/boost/sstable_datafile_test.cc b/test/boost/sstable_datafile_test.cc index 79b75f8bd1d1..7d8eef7ed4ec 100644 --- a/test/boost/sstable_datafile_test.cc +++ b/test/boost/sstable_datafile_test.cc @@ -3573,7 +3573,7 @@ SEASTAR_TEST_CASE(test_sstable_manager_auto_reclaim_and_reload_of_bloom_filter) }, { // limit available memory to the sstables_manager to test reclaiming. // this will set the reclaim threshold to 100 bytes. - .available_memory = 1000 + .available_memory = 500 }); } @@ -3654,6 +3654,6 @@ SEASTAR_TEST_CASE(test_bloom_filter_reclaim_during_reload) { }, { // limit available memory to the sstables_manager to test reclaiming. // this will set the reclaim threshold to 100 bytes. - .available_memory = 1000 + .available_memory = 500 }); }