diff options
author | Arnstein Ressem <aressem@verizonmedia.com> | 2021-08-19 15:06:28 +0200 |
---|---|---|
committer | Arnstein Ressem <aressem@verizonmedia.com> | 2021-08-19 15:06:28 +0200 |
commit | d72a1cdc1dc243bbc5c6088fd6c9b318ab0b7185 (patch) | |
tree | 2f1862ecf4fef66106022bac1346738b01f0822a /container-disc | |
parent | 6a5eda8ab6642ef223192a863fa5df37ba232ad8 (diff) |
Exit with error with no numactl. Use numactl if NUMA nodes are available and we have permissions to use it.
Diffstat (limited to 'container-disc')
-rwxr-xr-x | container-disc/src/main/sh/vespa-start-container-daemon.sh | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/container-disc/src/main/sh/vespa-start-container-daemon.sh b/container-disc/src/main/sh/vespa-start-container-daemon.sh index dcfb45c9698..a0cbd9d9186 100755 --- a/container-disc/src/main/sh/vespa-start-container-daemon.sh +++ b/container-disc/src/main/sh/vespa-start-container-daemon.sh @@ -110,24 +110,8 @@ configure_cpu() { } configure_numactl() { - log_message debug "starting ${VESPA_SERVICE_NAME} for ${VESPA_CONFIG_ID}" - - # We are allowed to use numactl - numnodes=$(numactl --hardware | - grep available | - awk '$3 == "nodes" { print $2 }') - if [ "$VESPA_AFFINITY_CPU_SOCKET" ] && - [ "$numnodes" -gt 1 ] - then - node=$(($VESPA_AFFINITY_CPU_SOCKET % $numnodes)) - log_message debug "with affinity to $VESPA_AFFINITY_CPU_SOCKET out of $numnodes cpu sockets" - numactlcmd="numactl --cpunodebind=$node --membind=$node" - else - log_message debug "with memory interleaving on all nodes" - numactlcmd="numactl --interleave all" - fi - - log_message debug "numactlcmd: $numactlcmd" + numactlcmd=$(get_numa_ctl_cmd) + log_message debug "starting ${VESPA_SERVICE_NAME} for ${VESPA_CONFIG_ID} with numactl command : $numactlcmd" } configure_gcopts() { |