1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/tools/tune-realtime.sh

21 lines
503 B
Bash
Executable file

#!/bin/bash
dnf -y --refresh install \
tuned-utils \
tuned-profiles-realtime
# Isolate half of the available cores by default
if [ -z "${ISOLATED_CORES}" ]; then
PROC=$(nproc)
ISOLATED_CORES=
if ((PROC > 4)); then
ISOLATED_CORES+=$(seq -s, $((PROC/2)) $((PROC-1)))
fi
fi
echo isolated_cores=${ISOLATED_CORES} >> /etc/tuned/realtime-variables.conf
# Enable dynamic preemption
grubby --update-kernel=ALL --remove-args="preempt=full"
# Select real-time tuned profile
tuned-adm profile realtime