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".


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

name=CentOS-7 - rt

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.

  • But if we need to add come config to kernel, how do we get its source code to make the change ? – ransh Oct 2 '19 at 15:53
  • There shouldn't be a need to configure anything real-time related in the kernel; only use tuned for that as described in the linked tuning guide. If you need to change kernel configs for other reasons, you'll find the SRPMs as usual at vault.centos.org. – Frank Zdarsky Oct 5 '19 at 19:50

If you're not experienced in patching your own kernel, install one of the stock real time kernels from a repository. One such option is to use the -ml series kernel from CERN.

To do so, first install the CERN-RT repo:

wget http://linuxsoft.cern.ch/cern/centos/7/rt/CentOS-RT.repo
yum groupinstall RT

This will install the RT kernel. Next:


After rebooting, you can then check the kernel version you're running like so:

uname -a

If you are NOT using the new kernel you just installed, you may need to adjust which kernel is set as default in /etc/default/grub. The GRUB_DEFAULT= points to the kernel image in use by numerical order. The first listed is 0, then 1, and so on. Once you've made sure that the correct number is listed, do:

grub2-mkconfig -o /boot/grub2/grub.cfg

Reboot again and verify that you're now on the correct kernel. More information on CERN kernels can be found here:


  • Thanks for your response, it put me on the right track. However after the wget, you must still copy the CentOS-RT.repo file into your /etc/yum.repos.d/ directory, and also copy the GPG contents from linuxsoft.cern.ch/cern/slc5X/i386/RPM-GPG-KEYs/RPM-GPG-KEY-cern into a file on your machine called /etc/pki/rpm-gpg/RPM-GPG-KEY-cern – Paulus Jul 16 '18 at 12:29
  • But if we need to add come config to kernel, how do we get its source code to make the change ? – ransh Oct 2 '19 at 15:53

There can be more than one solution when talking about real time linux kernel. If yiu read about the RT patch, the you should look here:


Rami Rosen

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.