Red Hat Enterprise Linux 7 Tuned : Overview and new features
Agenda ➢ What is tuned and tuned-adm ? ➢ Why was it created ? ➢ What is profile ? ➢ Types of tuning ➢ What is plug-in ? ➢ New features included in RHEL-7 ➢ More upcoming features (RFE) ➢ Package profile and usage ➢ Knowledge sources 2 Internal Use Only
What is tuned and tuned-adm ➢ Tuned is a daemon that uses udev to monitor connected devices and statically and dynamically tunes system settings according to a selected profile. ➢ In simple words ; tuned is a daemon adapt the operating system perform better under certain workloads by setting a tuning profile. ➢ Tuned is distributed with a number of predefined profiles for common use cases such as; High throughput Low latency Power save ➢ tuned-adm is a command line tool that lets users to switch between different tuning profiles. 3 Internal Use Only
Why was it created ? 40 35 System Daily Work Load 30 d Loa 25 k r 20 Wo 15 10 5 Time 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Work Load High : 08:00 – 19:00 [ 12 hours ] System Idle : 00:00 – 07:00 [ 08 hours ] : 20:00 – 23:00 [ 04 hours ]
4 Internal Use Only
Why was it created ? 35 System Weekly Work Load 30 25 ad Lo 20 k or 15 W g. 10 Av 5 Weekday 0 Monday Tuesday Wednesday Thursday Friday Saturday Sunday Work Load High : Working Days [ Mon, Tue, Wed, Thu, Fri ] System Idle : Non Working Days [ Sat and Sun ] ➢ Power consumption is almost equal at all time. ● Network cards are running at full speed at all time. Why ? Can I tune my system to perform good during peek hours as well as save power when the system is idle ? How ? 5 Internal Use Only
What is profile ? ➢ Profile contains various sysctl / sysfs settings and optionally a script that is run on profile activation / deactivation that improve performance for many workloads.
RHEL 6 : 12 pre-defined tuned profiles RHEL 7 : 10 pre-defined tuned profiles ➢ Additional profiles will be available based on the type of product. Red Hat Storage : rhs high throughput, virt RHEL Atomic : atomic host, atomic guest ➢ On RHEL-6, profiles are located inside /etc/tune profiles/ directory. ➢ On RHEL-7, profiles are located inside /usr/lib/tuned/ directory. 6 Internal Use Only
What is profile ? (cont...) ➢ The profiles provided with tuned are divided into two categories:
Power saving profiles Performance boosting profiles
➢ The performance boosting profiles include profiles that focus on the following: Low latency for storage and network High throughput for storage and network Virtual machine performance Virtualization host performance 7 Internal Use Only
Types of tuning: ➢ Static tuning: The static tuning mainly consists of the application of predefined sysctl and sysfs settings and one-shot activation of several configuration tools like ethtool. ➢ Dynamic tuning: Tuned monitors the use of system components and tunes system settings dynamically based on that monitoring information.
8 Internal Use Only
Plugins: ➢ A plug-in is a software component that adds a specific feature to an existing software application. ➢ tuned uses two types of plugins: Monitoring plugins Tuning plugins ➢ Monitoring plugins are used to get information from a running system. Currently, the following monitoring plugins are implemented: Disk Gets disk load (number of IO operations) per device and measurement interval.
Net Gets network load (number of transferred packets) per network card and measurement interval.
Load Gets CPU load per CPU and measurement interval. 9 Internal Use Only
Plugins: ( cont... ) ➢ Monitoring plugins are automatically instantiated whenever their metrics are needed by any of the enabled tuning plugins. ➢ The output of the monitoring plugins can be used by tuning plugins for dynamic tuning. ➢ Currently implemented dynamic tuning algorithms try to balance the performance and powersave and are therefore disabled in the performance profiles. ➢ Dynamic tuning for individual plugins can be enabled or disabled in the tuned profiles.
10 Internal Use Only
Plugins: ( cont... ) ➢ Each tuning plugin tunes an individual subsystem and takes several parameters that are populated from the tuned profiles. ➢ Currently, the following tuning plugins are implemented: cpu Sets the CPU governor to the value specified by the governor parameter. net Dynamically changes the interface speed according to the interface utilization. sysctl Sets various sysctl settings specified by the plugin parameters. usb Sets autosuspend timeout of USB devices to the value specified by the autosuspend parameter. vm Enables or disables transparent huge pages. audio Sets the autosuspend timeout for audio codecs to the value specified by the timeout parameter. 11 Internal Use Only
Plugins: ( cont... ) disk Sets the elevator to the value specified by the elevator parameter. mounts Enables or disables barriers for mounts. script This plugin can be used for the execution of an external script that is run when the profile is loaded or unloaded. sysfs Sets various sysfs settings specified by the plugin parameters. video Sets various powersave levels on video cards (currently only the Radeon cards are supported). 12 Internal Use Only
New features coming with RHEL-7 ➢ tuned package will be installed by default on the system and a profile will be automatically set based on variant ( recommend.conf ). RHEL 7 Desktop/Workstation : balance RHEL 7 Server/HPC : throughput-performance RHEL 7 KVM Host, Guest : virtual-host/virtual-guest RHEV : virtual-host Red Hat Storage : rhs-high-throughput, virt RHEL OSP (compute node) : virtual-host RHEL Atomic : atomic-host, atomic-guest 13 Internal Use Only
New features coming with RHEL-7 ➢ New tuned profiles are added for RHEL-7 features and characteristics. balanced desktop network-latency network-throughput powersave ➢ Profile are updated as per kernel version ( 3.10 ) tuning parameters. 14 Internal Use Only
New features coming with RHEL-7 ➢ Additional tuned profiles provided via package ( tuned profiles compat ) mainly for backward compatibility with tuned 1.0. default desktop-powersave enterprise-storage laptop-ac-powersave laptop-battery-powersave server-powersave spindown-disk
15 Internal Use Only
New features coming with RHEL-7 ➢ Re-written for maintainability and extensibility. ➢ Configuration is now consolidated into a single tuned.conf file. /usr/lib/tuned/balanced/tuned.conf ➢ tuned profiles are now located inside /usr/lib/tuned/ directory. ➢ Added bash-completion for tuned adm command.
# tuned adm <tab> <tab> active list off profile recommend 16 Internal Use Only
New features coming with RHEL-7 ➢ Adds concept of Inheritance. ➢ As an experimental feature it is possible to select more profiles at once. ➢ The tuned daemon will try to merge them during the load. ➢ If there are conflicts, the settings from the last specified profile will take precedence. ➢ This is done automatically and there is no checking whether the resulting combination of parameters makes sense. Caution: If used without thinking, the feature may tune some parameters the opposite way which may be counterproductive. 17 Internal Use Only
More upcoming features (RFEs) Bug # 1093883 ➢ Rebase to latest upstream "tuned" package for RHEL-7.1. ➢ Rebase will capture at least the following upstream features:
Verbosity settings for logging. Add tool to show all the options and their values for the selected profile.
Add mechanism to show description of the profile.
Log previous sysctl / sysfs settings.
Disable polling in tuning thread.
Resolve interaction between tuned and udev.
Provide white/blacklist support for tunings. 18 Internal Use Only
Package profile : ➢ The different tuned profiles and tuned-adm binary are provided by package "tuned". # rpm q tuned tuned 2.3.0 11.el7.noarch ➢ Global configuration file for tuned daemon:
# grep v "^#" /etc/tuned/tuned main.conf dynamic_tuning = 0 update_interval = 10 ➢ List of "Predefined profile" directories: # ls /usr/lib/tuned/ balanced desktop functions latency performance network latency network throughput powersave recommend.conf sap throughput performance virtual guest virtual host 19 Internal Use Only
Package profile : ➢ Main configuration file for individual profiles: # grep v "^#" /usr/lib/tuned/latency performance/tuned.conf [cpu] force_latency=1 governor=performance energy_perf_bias=performance min_perf_pct=100 [sysctl] kernel.sched_min_granularity_ns=10000000 vm.dirty_ratio=10 vm.dirty_background_ratio=3 vm.swappiness=10 kernel.sched_migration_cost_ns=5000000 ➢ Log file for tuned daemon:
/var/log/tuned/tuned.log 20 Internal Use Only
Usage : Start / Status / Stop ➢ To start tuned service, type the following command: # systemctl start tuned.service ➢ To check the status of tuned service, type the following command: # systemctl status tuned.service ➢ To enable tuned to start every time the machine boots, type the following command: # systemctl enable tuned.service 21 Internal Use Only
Usage: tuned-adm ➢ tuned-adm :- commandline tool for switching between different tuning profiles. tuned adm [ list , active , profile <profile> , off , recommend ] ➢ To view all available profiles, type the following command: # tuned adm list Available profiles: balanced desktop latency performance network latency network throughput powersave sap throughput performance virtual guest virtual host Current active profile: virtual guest 22 Internal Use Only
Usage: tuned-adm ➢ To check the active profile, type the following commands: # tuned adm active Current active profile: virtual guest # cat /etc/tuned/active_profile virtual guest ➢ To change the profile, type the following commands: # tuned adm profile latency performance ➢ This settings is persistent across reboots. 23 Internal Use Only
Usage: tuned-adm ➢ To set two profiles at a time, type the following command: # tuned adm profile <profile 1> <profile 2> Eg: # tuned adm active Current active profile: virtual guest latency performance ➢ To disable tuned daemon, type the following command: # tuned adm off ➢ To check recommended profile for system, type the following command: # tuned adm recommend virtual guest ➢ The recommended profile for system is decided according to data in /etc/system release cpe and virt what output. 24 Internal Use Only