Centos – Install a real-time kernel on CentOS

centoslinux-kernel

Recently I got to know about real time kernel. I just wanted to know how can I make my current CentOS 7.3 kernel into a real time kernel.

Kernel version I have is "3.10.0-514.2.2.el7.x86_64".

Best Answer

You need to first add the CentOS real time repo:

sudo tee /etc/yum.repos.d/CentOS-rt.repo >/dev/null <<EOF
# CentOS-rt.repo

[rt]
name=CentOS-7 - rt
baseurl=http://mirror.centos.org/centos/\$releasever/rt/\$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF

Then install the rt-kernel and tuned profile:

sudo yum update -y
sudo yum install -y kernel-rt rt-tests tuned-profiles-realtime
sudo reboot

Note, though, that a real time kernel alone does not automatically give you optimal real time behavior. There are many knobs that would need tuning to achieve that, from BIOS level (e.g. disabling CPU power save, some SMI interrupts, etc.) to system level (CPU partitioning, IRQ balancing, etc.) to application level.

You can find some useful tuning tips in the Advanced Tuning for RHEL for Real Time doc.

Related Question