Skip to content

Commit

Permalink
config: a property to control memory allocation for parallel fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
dlex committed May 31, 2023
1 parent 1db2edc commit ee5e069
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/v/config/configuration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,15 @@ configuration::configuration()
"kafka_schema_id_validation_cache_capacity",
"Per-shard capacity of the cache for validating schema IDs.",
{.needs_restart = needs_restart::no, .visibility = visibility::tunable},
128) {}
128)
, kafka_memory_share_for_fetch(
*this,
"kafka_memory_share_for_fetch",
"The share of kafka subsystem memory that can be used for fetch read "
"buffers, as a fraction of kafka subsystem memory amount",
{.needs_restart = needs_restart::yes, .visibility = visibility::user},
0.5,
{.min = 0.0, .max = 1.0}) {}

configuration::error_map_t configuration::load(const YAML::Node& root_node) {
if (!root_node["redpanda"]) {
Expand Down
2 changes: 2 additions & 0 deletions src/v/config/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ struct configuration final : public config_store {
// schema id validation
config::property<size_t> kafka_schema_id_validation_cache_capacity;

bounded_property<double, numeric_bounds> kafka_memory_share_for_fetch;

configuration();

error_map_t load(const YAML::Node& root_node);
Expand Down

0 comments on commit ee5e069

Please sign in to comment.