Skip to content

Commit

Permalink
Set ABT_THREAD_STACKSIZE if not given
Browse files Browse the repository at this point in the history
Priority: 2
Cancel-prev-build: false

Skip-nlt: false
Skip-unit-tests: false
Skip-func-test-vm: false
Skip-test-rpms: false
Allow-unstable-test: true
Skip-func-hw-test-large: false
Skip-func-hw-test-medium: false
Skip-func-hw-test-medium-verbs-provider: false

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
  • Loading branch information
grom72 committed Aug 28, 2024
1 parent 150978c commit 3cfa443
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
17 changes: 11 additions & 6 deletions src/control/server/engine/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion utils/config/examples/daos_server_tcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions utils/config/examples/daos_server_ucx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
-
Expand Down
3 changes: 0 additions & 3 deletions utils/config/examples/daos_server_verbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
-
Expand Down

0 comments on commit 3cfa443

Please sign in to comment.