Tuesday, December 20, 2016

Centos 7 Install Realtime kernel using yum

Wanted to try out an rt kernel for my asterisk box. One option is to build a patched kernel.. The other option I am trying out now is to install using the Cern repo. I am using a plain Centos 7 installation and not the Cern version. At the time of writing this I had to install an older version of tuned in order to successfully finish the process:
yum install http://ftp.ntua.gr/mirror/centos/7.2.1511/updates/x86_64/Packages/tuned-2.5.1-4.el7_2.6.noarch.rpm
Install the repo in /etc/yum.repos.d/Centos-RT.repo:
[rt]
name=CentOS-$releasever - RealTime
baseurl=http://linuxsoft.cern.ch/cern/centos/$releasever/rt/$basearch/
gpgcheck=1
enabled=1
protect=1
priority=10
gpgkey=http://linuxsoft.cern.ch/cern/centos/7/os/x86_64/RPM-GPG-KEY-cern
Finally yum groupinstall RT should install the rt kernel. Reboot to use. I am currently trying it on a VM and so far no issues.

Some initial tests:

RT Version (VM):
 
chrt -f 99 ./cyclictest -t1 -p 80 -i 10000 -n -l 100000
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 0.12 0.16 0.10 1/120 10969

T: 0 (10960) P:80 I:10000 C:  16390 Min:      6 Act:   20 Avg:   70 Max:   12866

hdparm -t /dev/sda2
/dev/sda2:
Timing buffered disk reads: 976 MB in  3.07 seconds = 317.71 MB/sec

Normal Version (VM):
 
chrt -f 99 ./cyclictest -t1 -p 80 -i 10000 -n -l 100000
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 0.95 0.37 0.14 1/108 10165

T: 0 ( 8828) P:80 I:10000 C:   4838 Min:      5 Act:  413 Avg:  210 Max:    7676

hdparm -t /dev/sda2
Timing buffered disk reads: 1014 MB in  3.01 seconds = 336.37 MB/sec

After repeating the VM tests, I concluded that the VM is not the proper way to test. I will try it on real hardware later and post the results.

Normal Version (E5140 - 2 Cores):
 
chrt -f 99 ./cyclictest -t1 -p 80 -i 10000 -n -l 100000
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 0.10 0.04 0.05 1/332 9408

T: 0 ( 9339) P:80 I:10000 C:   6901 Min:      3 Act:    3 Avg:    6 Max:    4503
hdparm -t /dev/sda2
Timing buffered disk reads: 526 MB in  3.01 seconds = 175.04 MB/sec

No comments: