Installation Guide
Installation and post-installation instructions for RHEL for Real Time
Maxim Svistunov
Marie Doleželová
Radek Bíba
David Ryan
Cheryn Tan
Lana Brindley
Alison Young
Abstract
Preface
Chapter 1. Why Use Red Hat Enterprise Linux for Real Time to Optimize Latency?
Figure 1.1. Benefit of Using Realtime over Standard Kernel System Tuning.
Chapter 2. Download
The only prerequisite of installing Red Hat Enterprise Linux for Real Time is that you have installed the most recent Red Hat Enterprise Linux 7 on an AMD64 or Intel 64 system.
The following sections describe how to install Red Hat Enterprise Linux for Real Time. Alternatively, an ISO image containing Red Hat Enterprise Linux for Real Time is available for download from the Customer Portal. You can use this ISO image to obtain all the RPM packages that Red Hat Enterprise Linux for Real Time consists of; however, because this is not a bootable ISO image, you cannot use it to create a bootable USB or CD medium.
2.1. Installing Red Hat Enterprise Linux for Real Time Using Yum
- Enable the Red Hat Enterprise Linux for Real Time repository:
~]#
subscription-manager repos --enable rhel-7-server-rt-rpms
- Install the Red Hat Enterprise Linux for Real Time package group:
~]#
yum groupinstall RT
This group installs several packages:- kernel-rt is the Red Hat Enterprise Linux for Real Time kernel package.
- rt-setup sets up the basic environment required by Red Hat Enterprise Linux for Real Time.
- rt-tests contains programs that test various RT features.
- rteval evaluates system suitability for Red Hat Enterprise Linux for Real Time.
- rteval-common provides common files for rteval.
- rteval-loads provides source code for rteval loads.
Additionally, tuna is a package containing a tool used to help tune the Red Hat Enterprise Linux for Real Time workload, greatly automating CPU isolation and thread affinity operations from the command line or the GUI. This package is available in the base Red Hat Enterprise Linux 7 repository. For information on using tuna, see Chapter 3, Red Hat Enterprise Linux for Real Time Kernel Tuning.
rpm -ql
command:
~]# rpm -ql rt-setup
/etc/security/limits.d/realtime.conf
/etc/sysconfig/rt-setup
/etc/systemd/system/rt-setup.service
/etc/udev/rules.d/99-rhel-rt.rules
/usr/bin/rt-setup
/usr/bin/rt-setup-kdump
/usr/bin/slub_cpu_partial_off
/usr/sbin/kernel-is-rt
2.2. Installing Red Hat Enterprise Linux for Real Time Using Diskless Boot
- Install the following packages required to set up a basic remote diskless system booted over PXE:
~]#
yum install tftp-server xinetd dhcp syslinux dracut-network
Important
- Ensure that the NFS and DHCP services are properly configured and started.
- Firewall rules which have been predefined by system-config-firewall can block tftp traffic and prevent the clients from booting. It is necessary to adjust the firewall rules on the server.
- Enable the tftp service to allow PXE booting via the network. To do so, edit the
/etc/xinetd.d/tftp
file and set theDisabled
parameter toNo
. - Copy
/usr/share/syslinux/pxelinux.0
to the tftp root directory in/var/lib/tftpboot/
:~]#
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
- Create a
pxelinux.cfg
directory inside the tftp root directory:~]#
mkdir -p /var/lib/tftpboot/pxelinux.cfg/
- Configure firewall rules to allow tftp traffic. Using a text editor, add the following line to
/etc/hosts.allow
:tftpd: .hostname.com
Replace .hostname.com with the domain name of the target clients on which the installations will be performed. For more information on firewall rules refer to the man page forhosts_access
. - Restore the SELinux context on the tftp server. To provide the necessary files via the tftp protocol for PXE boot, run the following command:
~]#
restorecon -R /var/lib/tftpboot
- To enable PXE booting on the DHCP server, add the following configuration to
/etc/dhcp/dhcpd.conf
:allow booting; allow bootp; class "pxeclients" { match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; next-server server-ip; filename "pxelinux.0"; }
Replace server-ip with the IP address of the host machine on which the tftp and DHCP services reside. - The root directory of the exported file system (used by diskless clients in the network) is shared via NFS. Configure the NFS service to export the root directory by adding it to the
/etc/exports
file in the following format:/exported/root/directory hostname.com(rw,sync,no_root_squash)
The example configuration exports the directory /export/root/directory to all hosts on the hostname.com network withread-write
permissions. Thesync
option ensures that the NFS server will not reply to requests before changes made by previous requests are written to disk. Theno_root_squash
option enables the NFS server to connect to the client with root privileges. - To accommodate completely diskless clients, the root directory should contain a complete Red Hat Enterprise Linux for Real Time installation. You can synchronize this with a running system via rsync. Run:
~]#
rsync -a -e ssh --exclude='/proc/*' --exclude='/sys/*'
hostname.com:/ /exported/root/directoryReplace hostname.com with the hostname of the running system with which to synchronize via rsync. The /exported/root/directory is the path to the exported file system. - Add the following configuration to the exported file system's
/etc/fstab
file:none /tmp tmpfs defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0
- Select the kernel that diskless clients should use (
vmlinuz-rt-kernel-version
) and copy it to the tftpboot directory:~]#
cp /boot/vmlinuz-rt-kernel-version /var/lib/tftpboot/
- Create the
initramfs
disk image (i.e.initramfs-rt-kernel-version.img
) with network support:~]#
dracut -a "network nfs"
initramfs-rt-kernel-version.img rt-kernel-version - Copy the
initramfs
disk image to the tftpboot directory:~]#
cp initramfs-rt-kernel-version.img /var/lib/tftpboot/
- Edit the default boot configuration to use the
initramfs
disk image and Realtime kernel inside/var/lib/tftpboot
. This configuration instructs the diskless client to mount the exported file system (/exported/root/directory
) as read-write. To do this, configure/var/lib/tftpboot/pxelinux.cfg/default
with the following:default realtime label realtime kernel vmlinuz-rt-kernel-version append initrd=initramfs-rt-kernel-version.img root=nfs:server-ip:/exported/root/directory rw
Replace server-ip with the IP address of the host machine on which the exported NFS root partition resides.
Important
SELINUX=disabled
to the /etc/selinux/config
file, or add selinux=0
on the kernel command line when booting the client.
2.3. Available RPM Packages
No
in this column indicates that the RPM performs equivalently on Red Hat Enterprise Linux 7.
No
in this column indicates that usage is optional.
Table 2.1. Basic Red Hat Enterprise Linux for Real Time Kernel Packages
RPM Package Name | Description | Red Hat Enterprise Linux for Real Time Specific? | Required? |
---|---|---|---|
kernel-rt | Low latency and preemption functionality | Yes | Yes |
kernel-rt-doc | Red Hat Enterprise Linux for Real Time documentation | Yes | Advised |
Table 2.2. Red Hat Enterprise Linux for Real Time Development and Test Packages
RPM Package Name | Description |
---|---|
kernel-rt-devel | Headers and libraries for kernel development |
kernel-rt-trace | Red Hat Enterprise Linux for Real Time kernel with tracing functions compiled in |
kernel-rt-trace-devel | Headers and libraries for development on trace kernel |
kernel-rt-debug | Red Hat Enterprise Linux for Real Time kernel with debugging functions compiled in (slow) |
kernel-rt-debug-devel | Headers and libraries for development on debug kernel |
rt-tests | Utilities for measuring system latencies and for proving that priority-inheritance mutexes function properly |
Red Hat Enterprise Linux for Real Time - Debug RPMs
repository.
Table 2.3. Red Hat Enterprise Linux for Real Time Debugging Packages
RPM Package Name | Description |
---|---|
kernel-rt-debuginfo | Symbols for profiling and debugging use, such as oprofile or systemtap |
kernel-rt-trace-debuginfo | Symbols for profiling and tracing |
kernel-rt-debug-debuginfo | Symbols for profiling and tracing |
kernel-rt-debuginfo-common | Common debuginfo files shared between the other debuginfo packages |
Important
2.4. Post-Installation Instructions
Any installed kernel, both standard and Real Time, can be booted. One way is to select the desired kernel manually in the GRUB menu during booting. Another way is to set the default kernel to the desired one as shown in this section.
- To verify that the Real Time kernel is the default kernel, run as root:
~]#
grubby --default-kernel
/boot/vmlinuz-3.10.0-327.18.2.rt56.223.el7_2.x86_64The rt designation in the above example shows that the default kernel is the Real Time kernel. - To show which kernel the system is currently running, use this command:
~]$
uname -a
Linux rt-server.example.com 3.10.0-327.18.2.rt56.223.el7_2.x86_64 …
- List the installed Real Time kernels:
~]#
ls /boot/vmlinuz*rt*
/boot/vmlinuz-3.10.0-327.18.2.rt56.223.el7_2.x86_64 - Set the default kernel to the listed Real Time kernel by running the following command as root:
~]#
grubby --set-default realtime-kernel
Substitute realtime-kernel with the Real Time kernel version, for example:~]#
grubby --set-default /boot/vmlinuz-3.10.0-327.18.2.rt56.223.el7_2.x86_64
Red Hat Enterprise Linux for Real Time differs substantially from the standard Red Hat Enterprise Linux 7 kernel. As a consequence, third-party kernel modules are incompatible with Red Hat Enterprise Linux for Real Time.
- EMC Powerpath
- NVidia graphics
- Advanced storage adapter configuration utilities from Qlogic
syscall
interface is compatible with Red Hat Enterprise Linux for Real Time.
You can configure Red Hat Enterprise Linux for Real Time to provide crash dump information by enabling kexec/kdump
, if you have not done so for the standard kernel during the installation of Red Hat Enterprise Linux 7. Further information and instructions on how to configure your system to obtain kernel crash information can be found in the Red Hat Enterprise Linux for Real Time Tuning Guide.
Chapter 3. Red Hat Enterprise Linux for Real Time Kernel Tuning
The primary diagnostic facility provided with the Red Hat Enterprise Linux for Real Time kernel is Tuna. Tuna provides both a command line tool and a graphical interface that can be used to change attributes of threads (scheduling policy, scheduler priority and processor affinity) and interrupts (processor affinity). The tool is designed to be used on a running system, and changes take place immediately. This allows any application-specific measurement tools to see and analyze system performance immediately after the changes have been made.
The Red Hat Enterprise Linux for Real Time kernel provides several diagnostic tools to test and report on latencies.
latency tracer
is a peak detector which is used to identify the longest running non-preemptable kernel codepaths. This is particularly useful for identifying whether non-deterministic performance results are attributable to the kernel or to user-space components. In customer deployments, the tool is most useful to differentiate whether delays are in the kernel or the application.
ftrace
utility is used to analyze and debug latency and performance issues that occur outside of user-space. It has a variety of options that allow you to use the utility in a number of different ways. It can be used to trace context switches, measure the time it takes for a high-priority task to wake up, measure the length of time for which interrupts are disabled, or list all the kernel functions executed during a given period.
Chapter 4. More Information
4.1. Reporting Bugs
Before you file a bug report, follow these steps to diagnose where the problem has been introduced. This will greatly assist in rectifying the problem.
- Check that you have the latest version of the Red Hat Enterprise Linux 7 kernel, then boot into it from the GRUB menu. Try reproducing the problem with the standard kernel. If the problem still occurs, report a bug against Red Hat Enterprise Linux 7.
- If the problem does not occur when using the standard kernel, then the bug is probably the result of changes introduced in the Red Hat Enterprise Linux for Real Time specific enhancements Red Hat has applied on top of the baseline (3.10.0) kernel.
If you have determined that the bug is specific to Red Hat Enterprise Linux for Real Time follow these instructions to enter a bug report:
- Create a Bugzilla account if you do not have it yet.
- Click on Enter A New Bug Report. Log in if necessary.
- Select the
Red Hat
classification. - Select the
Red Hat Enterprise Linux 7
product. - If it is a kernel issue, enter
kernel-rt
as the component. Otherwise, enter the name of the affected user-space component, such asrteval
. - Continue to enter the bug information by giving a detailed problem description. When entering the problem description be sure to include details of whether you were able to reproduce the problem on the standard Red Hat Enterprise Linux 7 kernel.
Appendix A. Revision History
Revision History | |||
---|---|---|---|
Revision 1-13 | Tue Sep 29 2020 | Jaroslav Klech | |
| |||
Revision 1-12 | Tue Mar 31 2020 | Jaroslav Klech | |
| |||
Revision 1-11 | Tue Aug 6 2019 | Jaroslav Klech | |
| |||
Revision 1-10 | Thu Oct 18 2018 | Jaroslav Klech | |
| |||
Revision 1-9 | Tue Mar 20 2018 | Marie Doleželová | |
| |||
Revision 1-8 | Wed Jul 26 2017 | Jana Heves | |
| |||
Revision 1-5 | Sat Jun 24 2017 | Marie Doleželová | |
| |||
Revision 1-3 | Mon Nov 3 2016 | Maxim Svistunov | |
| |||
Revision 1-2 | Fri Nov 06 2015 | Tomáš Čapek | |
| |||
Revision 1-1 | Thu Feb 19 2015 | Radek Bíba | |
|