diff --git a/packaging/live-iso/files/usr/local/bin/tune-realtime b/packaging/live-iso/files/usr/local/bin/tune-realtime deleted file mode 100755 index 9f6a0f025..000000000 --- a/packaging/live-iso/files/usr/local/bin/tune-realtime +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -ARCH=$(rpm -q --qf "%{arch}\n" glibc) -RELEASE=$(rpm -q --qf "%{version}\n" fedora-release) - -# Install Planet CCRMA repository which includes RT_PREEMPT patched kernels -rpm -Uvh http://ccrma.stanford.edu/planetccrma/mirror/fedora/linux/planetccrma/${RELEASE}/${ARCH}/planetccrma-repo-1.1-3.fc${RELEASE}.ccrma.noarch.rpm - - -dnf -y --refresh install \ - tuned-utils \ - tuned-profiles-realtime - kernel-rt \ - kernel-rt-modules \ - kernel-rt-modules-extra - -echo "isolated_cores=3-7" >> /etc/tuned/realtime-variables.conf - -tuned-adm profile realtime diff --git a/tools/tune-realtime.sh b/tools/tune-realtime.sh new file mode 100755 index 000000000..e22c44947 --- /dev/null +++ b/tools/tune-realtime.sh @@ -0,0 +1,21 @@ +#!/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