18.1 Configuring Tuned
Tuned is a service that monitors your system and optimizes the performance under certain workloads. The core of Tuned are profiles, which tune your system for different use cases.
Tuned is distributed with a number of predefined profiles for use cases such as:
High throughput
Low latency
Saving power
It is possible to modify the rules defined for each profile and customize how to tune a particular device. When you switch to another profile or deactivate Tuned, all changes made to the system settings by the previous profile revert back to their original state.
You can also configure Tuned to react to changes in device usage and adjusts settings to improve performance of active devices and reduce power consumption of inactive devices.
Tuned profiles
A detailed analysis of a system can be very time-consuming. Tuned provides a number of predefined profiles for typical use cases. You can also create, modify, and delete profiles.
The profiles provided with Tuned are divided into the following categories:
Power-saving profiles
Performance-boosting profiles
The performance-boosting profiles include profiles that focus on the following aspects:
Low latency for storage and network
High throughput for storage and network
Virtual machine performance
Virtualization host performance
The location of profiles
Tuned stores profiles in the following directories:
/usr/lib/tuned/
Distribution-specific profiles are stored in the directory. Each profile has its own directory. The profile consists of the main configuration file called tuned.conf, and optionally other files, for example helper scripts.
/etc/tuned/
If you need to customize a profile, copy the profile directory into the directory, which is used for custom profiles. If there are two profiles of the same name, the custom profile located in /etc/tuned/ is used.
The syntax of profile configuration
The tuned.conf file can contain one [main] section and other sections for configuring plug-in instances. However, all sections are optional.
Lines starting with the hash sign (#) are comments.
Install tuned
First we must install tuned to use it the only package needed is tuned:
dnf install tuned
Then we must enable it and start it:
systemctl enable tuned --now
Checking tuned configuration
Tuned is used with the command tuned-adm:
To show what tuned profile is active use:
tuned-adm active
Result:
[root@rhcsa ~]# tuned-adm active
Current active profile: desktop
To show a list of all profiles:
tuned-adm list
Result:
[root@rhcsa ~]# tuned-adm list
Available profiles:
- accelerator-performance - Throughput performance based tuning with disabled higher latency STOP states
- balanced - General non-specialized tuned profile
- desktop - Optimize for the desktop use-case
- hpc-compute - Optimize for HPC compute workloads
- intel-sst - Configure for Intel Speed Select Base Frequency
- latency-performance - Optimize for deterministic performance at the cost of increased power consumption
- network-latency - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- powersave - Optimize for low power consumption
- throughput-performance - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest - Optimize for running inside a virtual guest
- virtual-host - Optimize for running KVM guests
Current active profile: desktop
Setup Tuned
To recomend what profile to use:
tuned-adm recommend
Result:
[root@rhcsa ~]# tuned-adm recommend
virtual-guest
To select another profile:
tuned-adm profile virtual-host
To check if it is being used:
tuned-adm active
Result:
[root@rhcsa ~]# tuned-adm active
Current active profile: virtual-host