From 965a004319392b4ae54b0991b7f485cb5159dfcc Mon Sep 17 00:00:00 2001 From: John Spray Date: Fri, 29 Jul 2022 14:40:50 +0100 Subject: [PATCH] config: add storage_compaction_index_memory This property controls the new bound on per-shard memory used for compaction indices at scale. --- src/v/config/configuration.cc | 10 ++++++++++ src/v/config/configuration.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/v/config/configuration.cc b/src/v/config/configuration.cc index 297e6abac797d..eefe9bcda6791 100644 --- a/src/v/config/configuration.cc +++ b/src/v/config/configuration.cc @@ -756,6 +756,16 @@ configuration::configuration() .visibility = visibility::tunable}, 1024, {.min = 128}) + , storage_compaction_index_memory( + *this, + "storage_compaction_index_memory", + "Maximum number of bytes that may be used on each shard by compaction" + "index writers", + {.needs_restart = needs_restart::no, + .example = "1073741824", + .visibility = visibility::tunable}, + 128_MiB, + {.min = 16_MiB, .max = 100_GiB}) , max_compacted_log_segment_size( *this, "max_compacted_log_segment_size", diff --git a/src/v/config/configuration.h b/src/v/config/configuration.h index c5bc0548aa001..b89cab338e6a0 100644 --- a/src/v/config/configuration.h +++ b/src/v/config/configuration.h @@ -167,6 +167,7 @@ struct configuration final : public config_store { property segment_fallocation_step; bounded_property storage_target_replay_bytes; bounded_property storage_max_concurrent_replay; + bounded_property storage_compaction_index_memory; property max_compacted_log_segment_size; property id_allocator_log_capacity; property id_allocator_batch_size;