From f1926f5b11cfb6f2db2cddd2dd3d0c32d76a0d14 Mon Sep 17 00:00:00 2001 From: Stephan Dollberg Date: Fri, 1 Mar 2024 09:58:33 +0000 Subject: [PATCH 1/2] node_config: Enable large alloc warnings above 128KiB by default We already have the reactor stall warnings on in "prod" and arguably the large allocs are more important as they actually might result in a crash. Further the large alloc threshold automatically increases after each warning so it's unlikely for this to be very spamy. (cherry picked from commit 2be51c0a0112ce4e77f37152a4180fc42bbe1312) --- src/v/config/node_config.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v/config/node_config.cc b/src/v/config/node_config.cc index 85f05e30f58dd..1f5bc90112b7c 100644 --- a/src/v/config/node_config.cc +++ b/src/v/config/node_config.cc @@ -158,7 +158,7 @@ node_config::node_config() noexcept "memory_allocation_warning_threshold", "Enables log messages for allocations greater than the given size.", {.visibility = visibility::tunable}, - std::nullopt) + 128_KiB + 1) // 128 KiB is the largest allowed allocation size , storage_failure_injection_enabled( *this, "storage_failure_injection_enabled", From 6fbbeb6b970b2650d9921a658f1d073a38a3d333 Mon Sep 17 00:00:00 2001 From: Stephan Dollberg Date: Fri, 1 Mar 2024 10:10:02 +0000 Subject: [PATCH 2/2] tests: Remove explicit setting of large alloc threshold Remove the passing of the large alloc warning threshold in DT. We now set it to 128KiB by default in the binary so we don't want to override it 256KiB in DT. Note this doesn't affect the actual BadLogLines check as that has a separate limit of 400KiB for marking log lines as hard failures. (cherry picked from commit a9003cc50718cfe73792abd15b78bb3d46b75666) --- tests/rptest/services/redpanda.py | 10 +--------- tests/rptest/services/templates/redpanda.yaml | 3 --- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/rptest/services/redpanda.py b/tests/rptest/services/redpanda.py index 82a57b1d8f6ae..fdbfde53a5c34 100644 --- a/tests/rptest/services/redpanda.py +++ b/tests/rptest/services/redpanda.py @@ -3145,12 +3145,6 @@ def write_node_conf_file(self, except: cur_ver = None - # This node property isn't available on versions of RP older than 23.2. - if cur_ver and cur_ver >= (23, 2, 0): - memory_allocation_warning_threshold_bytes = 256 * 1024 # 256 KiB - else: - memory_allocation_warning_threshold_bytes = None - conf = self.render("redpanda.yaml", node=node, data_dir=RedpandaService.DATA_DIR, @@ -3169,9 +3163,7 @@ def write_node_conf_file(self, superuser=self._superuser, sasl_enabled=self.sasl_enabled(), endpoint_authn_method=self.endpoint_authn_method(), - auto_auth=self._security.auto_auth, - memory_allocation_warning_threshold= - memory_allocation_warning_threshold_bytes) + auto_auth=self._security.auto_auth) if override_cfg_params or node in self._extra_node_conf: doc = yaml.full_load(conf) diff --git a/tests/rptest/services/templates/redpanda.yaml b/tests/rptest/services/templates/redpanda.yaml index 7344d2f56d2fe..ff3708d67e17b 100644 --- a/tests/rptest/services/templates/redpanda.yaml +++ b/tests/rptest/services/templates/redpanda.yaml @@ -12,9 +12,6 @@ redpanda: data_directory: "{{data_dir}}" {% if node_id is not none %} node_id: {{node_id}} -{% endif %} -{% if memory_allocation_warning_threshold is not none %} - memory_allocation_warning_threshold: {{memory_allocation_warning_threshold}} {% endif %} rpc_server: address: "{{node.account.hostname}}"