diff --git a/src/control/server/engine/config.go b/src/control/server/engine/config.go index 7d9b626dae75..8eb35f1e792f 100644 --- a/src/control/server/engine/config.go +++ b/src/control/server/engine/config.go @@ -30,7 +30,7 @@ const ( envLogDbgStreams = "DD_MASK" envLogSubsystems = "DD_SUBSYS" - MIN_ABT_THREAD_STACKSIZE_FOR_DCPM = 18432 + MIN_ABT_THREAD_STACKSIZE_FOR_DCPM = 184320 ) // FabricConfig encapsulates networking fabric configuration. @@ -349,13 +349,18 @@ func (c *Config) Validate() error { // ensure 18k ABT stack size for engine with DCPM storage class if c.Storage.Tiers[0].IsSCM() && c.Storage.Tiers[0].Class == storage.ClassDcpm { stacksize, err := c.GetEnvVar("ABT_THREAD_STACKSIZE") - if err == nil { - i, err := strconv.Atoi(stacksize) - if err == nil && i >= MIN_ABT_THREAD_STACKSIZE_FOR_DCPM { - return nil + if errors.Is(err, os.ErrNotExist) { + fmt.Printf("env_var ABT_THREAD_STACKSIZE set to %d for `dcpm` storage class\n", + MIN_ABT_THREAD_STACKSIZE_FOR_DCPM) + c.EnvVars = append(c.EnvVars, fmt.Sprintf("ABT_THREAD_STACKSIZE=%d", + MIN_ABT_THREAD_STACKSIZE_FOR_DCPM)) + } else { + i, err1 := strconv.Atoi(stacksize) + if err != nil || err1 != nil || i < MIN_ABT_THREAD_STACKSIZE_FOR_DCPM { + return errors.New(fmt.Sprintf("env_var ABT_THREAD_STACKSIZE should >= %d for `dcpm` storage class", + MIN_ABT_THREAD_STACKSIZE_FOR_DCPM)) } } - return errors.Errorf("env_var ABT_THREAD_STACKSIZE=%d is required for `dcpm` storage class", MIN_ABT_THREAD_STACKSIZE_FOR_DCPM) } return nil diff --git a/utils/config/examples/daos_server_tcp.yml b/utils/config/examples/daos_server_tcp.yml index 93ab8e246a85..635abe89dce6 100644 --- a/utils/config/examples/daos_server_tcp.yml +++ b/utils/config/examples/daos_server_tcp.yml @@ -38,7 +38,6 @@ engines: env_vars: # influence DAOS I/O Engine behavior by setting env variables - FI_SOCKETS_MAX_CONN_RETRY=1 - FI_SOCKETS_CONN_TIMEOUT=2000 - - ABT_THREAD_STACKSIZE=18432 # Storage definitions (one per tier) storage: diff --git a/utils/config/examples/daos_server_ucx.yml b/utils/config/examples/daos_server_ucx.yml index 7eb3e9c239d3..bdd35a4c647a 100644 --- a/utils/config/examples/daos_server_ucx.yml +++ b/utils/config/examples/daos_server_ucx.yml @@ -43,9 +43,6 @@ engines: log_mask: ERR log_file: /tmp/daos_engine.0.log - env_vars: - - ABT_THREAD_STACKSIZE=18432 - # Storage definitions (one per tier) storage: - diff --git a/utils/config/examples/daos_server_verbs.yml b/utils/config/examples/daos_server_verbs.yml index 6fab9e9c991f..667992351fc3 100644 --- a/utils/config/examples/daos_server_verbs.yml +++ b/utils/config/examples/daos_server_verbs.yml @@ -34,9 +34,6 @@ engines: log_mask: ERR log_file: /tmp/daos_engine.0.log - env_vars: - - ABT_THREAD_STACKSIZE=18432 - # Storage definitions (one per tier) storage: -