From 0ea783747646f0433480983f2e084632e0eb421c Mon Sep 17 00:00:00 2001 From: Arnstein Ressem Date: Mon, 23 Aug 2021 09:23:21 +0200 Subject: Revert "Revert "Reapply "Fail Vespa startup if no numactl .""" --- .../src/main/sh/vespa-start-container-daemon.sh | 23 ++-------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'container-disc/src') 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 223124c29d6..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,27 +110,8 @@ configure_cpu() { } configure_numactl() { - log_message debug "starting ${VESPA_SERVICE_NAME} for ${VESPA_CONFIG_ID}" - if numactl --interleave all true &> /dev/null; then - # 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 - else - log_message debug "without numactl (no permission or not available)" - numactlcmd="" - 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() { -- cgit v1.2.3