2. Internal Use Only2
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
3. Internal Use Only3
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.
4. Internal Use Only4
Why was it created ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
0
5
10
15
20
25
30
35
40
System Daily Work Load
Time
Work Load
Work Load High : 08:00 – 19:00 [ 12 hours ]
System Idle : 00:00 – 07:00 [ 08 hours ]
: 20:00 – 23:00 [ 04 hours ]
5. Internal Use Only5
Why was it created ?
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
0
5
10
15
20
25
30
35
System Weekly Work Load
Weekday
Avg. Work Load
Work Load High : Working Days [ Mon, Tue, Wed, Thu, Fri ]
System Idle : NonWorking 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 ?
6. Internal Use Only6
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 :
rhshighthroughput, virt
RHEL Atomic :
atomichost, atomicguest
➢ On RHEL-6, profiles are located inside /etc/tuneprofiles/ directory.
➢ On RHEL-7, profiles are located inside /usr/lib/tuned/ directory.
7. Internal Use Only7
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
8. Internal Use Only8
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.
9. Internal Use Only9
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.
10. Internal Use Only10
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.
11. Internal Use Only11
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.
12. Internal Use Only12
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).
13. Internal Use Only13
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
14. Internal Use Only14
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.
15. Internal Use Only15
New features coming with RHEL-7
➢ Additional tuned profiles provided via package ( tunedprofilescompat )
mainly for backward compatibility with tuned 1.0.
default
desktop-powersave
enterprise-storage
laptop-ac-powersave
laptop-battery-powersave
server-powersave
spindown-disk
16. Internal Use Only16
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 tunedadm command.
# tunedadm <tab> <tab>
active list off profile recommend
17. Internal Use Only17
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.
18. Internal Use Only18
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.
19. Internal Use Only19
Package profile :
➢ The different tuned profiles and tuned-adm binary are provided by package
"tuned".
# rpm q tuned
tuned2.3.011.el7.noarch
➢ Global configuration file for tuned daemon:
# grep v "^#" /etc/tuned/tunedmain.conf
dynamic_tuning = 0
update_interval = 10
➢ List of "Predefined profile" directories:
# ls /usr/lib/tuned/
balanced desktop functions latencyperformance networklatency
networkthroughput powersave recommend.conf sap throughputperformance
virtualguest virtualhost
20. Internal Use Only20
Package profile :
➢ Main configuration file for individual profiles:
# grep v "^#" /usr/lib/tuned/latencyperformance/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
21. Internal Use Only21
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
22. Internal Use Only22
Usage: tuned-adm
➢ tuned-adm :- commandline tool for switching between different tuning profiles.
tunedadm [ list , active , profile <profile> , off , recommend ]
➢ To view all available profiles, type the following command:
# tunedadm list
Available profiles:
balanced
desktop
latencyperformance
networklatency
networkthroughput
powersave
sap
throughputperformance
virtualguest
virtualhost
Current active profile: virtualguest
23. Internal Use Only23
Usage: tuned-adm
➢ To check the active profile, type the following commands:
# tunedadm active
Current active profile: virtualguest
# cat /etc/tuned/active_profile
virtualguest
➢
To change the profile, type the following commands:
# tunedadm profile latencyperformance
➢
This settings is persistent across reboots.
24. Internal Use Only24
Usage: tuned-adm
➢ To set two profiles at a time, type the following command:
# tunedadm profile <profile1> <profile2>
Eg:
# tunedadm active
Current active profile: virtualguest latencyperformance
➢ To disable tuned daemon, type the following command:
# tunedadm off
➢ To check recommended profile for system, type the following command:
# tunedadm recommend
virtualguest
➢ The recommended profile for system is decided according to data in /etc/system
releasecpe and virtwhat output.
25. Internal Use Only25
Knowledge sources
Documentation:
Fedora Project: Power Management Guide
http://goo.gl/8uQQBm
Red Hat Enterprise Linux 7.0 Beta: Performance Tuning Guide
http://goo.gl/Ahjudn
Fedora Hosted: Tuned Quick Start Guide
https://fedorahosted.org/tuned/
Blog:
Tuning Your System With Tuned
http://servicesblog.redhat.com/2012/04/16/tuning-your-system-with-tuned/
Customer Portal Videos:
Red Hat Enterprise Linux 7 - Using Tuned for Tuning an Oracle Workload
https://access.redhat.com/site/videos/898563
Red Hat Enterprise Linux 7 - Using Tuned for Network Latency Applications
https://access.redhat.com/site/videos/898583
Knowlegebase Solution:
How do I create my own tuned profile on RHEL7 ?
https://access.redhat.com/site/node/731473