mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
tools: revamp and move tune-realtime script to tools folder
This commit is contained in:
parent
b402048082
commit
71ba4a96d7
2 changed files with 21 additions and 19 deletions
|
@ -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
|
21
tools/tune-realtime.sh
Executable file
21
tools/tune-realtime.sh
Executable file
|
@ -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
|
Loading…
Add table
Reference in a new issue