]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: add crimson_memory config option
authorRonen Friedman <rfriedma@redhat.com>
Sun, 3 May 2026 07:10:34 +0000 (07:10 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Mon, 11 May 2026 12:34:21 +0000 (12:34 +0000)
Add a crimson_memory configuration option that maps to seastar's
--memory flag, allowing control over the per-OSD seastar memory
allocation. Default is 0, meaning seastar uses its default behavior.

This reduces core dump sizes in test environments (from ~117GB to
~32GB with crimson_memory=32G) by limiting the pre-allocated seastar
memory pool.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/common/options/crimson.yaml.in
src/crimson/osd/main_config_bootstrap_helpers.cc

index 88ccaac0760a703beeef3911b7cf059a09073a6a..c543b96b5de673ec913837e87101aa2fb48d3bd2 100644 (file)
@@ -27,6 +27,16 @@ options:
   - startup
   min: 0
   max: 32
+- name: crimson_memory
+  type: size
+  level: advanced
+  default: 0
+  desc: Total memory to use for the seastar allocator per OSD.
+  long_desc: Total memory to use for the seastar allocator per OSD.
+             Maps to seastar's --memory flag. 0 means use seastar's default
+             (all available memory minus a reserve).
+  flags:
+  - startup
 
 # Reactor options:
 
index 158e33d261303b6c5a00601884dcbedcfc397ee3..7087b3b799313cc0a0cbb82fc6447dd6e35c0c95 100644 (file)
@@ -96,7 +96,8 @@ const std::vector<SeastarOption> seastar_options = {
   {"--io-latency-goal-ms", "crimson_reactor_io_latency_goal_ms", Option::TYPE_FLOAT},
   {"--idle-poll-time-us", "crimson_reactor_idle_poll_time_us", Option::TYPE_UINT},
   {"--poll-mode", "crimson_poll_mode", Option::TYPE_BOOL},
-  {"--reactor-backend", "crimson_reactor_backend", Option::TYPE_STR}
+  {"--reactor-backend", "crimson_reactor_backend", Option::TYPE_STR},
+  {"--memory", "crimson_memory", Option::TYPE_SIZE}
 };
 
 std::optional<std::string> get_option_value(const SeastarOption& option) {
@@ -113,6 +114,12 @@ std::optional<std::string> get_option_value(const SeastarOption& option) {
       }
       break;
     }
+    case Option::TYPE_SIZE: {
+      if (auto value = crimson::common::get_conf<Option::size_t>(option.config_key)) {
+        return std::to_string(value);
+      }
+      break;
+    }
     case Option::TYPE_BOOL: {
      if (crimson::common::get_conf<bool>(option.config_key)) {
         return "true";