tuned

26
Red Hat Enterprise Linux 7 Tuned : Overview and new features

Upload: reanimation-bk

Post on 26-Jun-2015

520 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: Tuned

Red Hat Enterprise Linux 7 Tuned : Overview and new features

Page 2: Tuned

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

Page 3: Tuned

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.

Page 4: Tuned

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 240

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 ]      

Page 5: Tuned

Internal Use Only5

Why was it created ?

Monday Tuesday Wednesday Thursday Friday Saturday Sunday0

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    : 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 ?

Page 6: Tuned

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 :  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.

Page 7: Tuned

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

Page 8: Tuned

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.

Page 9: Tuned

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.

Page 10: Tuned

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.

Page 11: Tuned

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:

cpuSets the CPU governor to the value specified by the governor parameter.

netDynamically changes the interface speed according to the interface utilization.

sysctlSets various sysctl settings specified by the plugin parameters.

usbSets autosuspend timeout of USB devices to the value specified by the autosuspend parameter.

vmEnables or disables transparent huge pages.

audioSets the autosuspend timeout for audio codecs to the value specified by the timeout parameter.

Page 12: Tuned

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).

Page 13: Tuned

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

Page 14: Tuned

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.

Page 15: Tuned

Internal Use Only15

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

Page 16: Tuned

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 tuned­adm command. # tuned­adm <tab> <tab> active  list  off   profile   recommend 

Page 17: Tuned

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.

Page 18: Tuned

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.

Page 19: Tuned

Internal Use Only19

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 = 0update_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

Page 20: Tuned

Internal Use Only20

Package profile :

➢ Main configuration file for individual profiles:

# grep ­v "^#" /usr/lib/tuned/latency­performance/tuned.conf 

[cpu]force_latency=1governor=performanceenergy_perf_bias=performancemin_perf_pct=100

[sysctl]kernel.sched_min_granularity_ns=10000000vm.dirty_ratio=10vm.dirty_background_ratio=3vm.swappiness=10kernel.sched_migration_cost_ns=5000000

➢ Log file for tuned daemon:   /var/log/tuned/tuned.log

Page 21: Tuned

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

Page 22: Tuned

Internal Use Only22

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 listAvailable profiles:­ balanced­ desktop­ latency­performance­ network­latency­ network­throughput­ powersave­ sap­ throughput­performance­ virtual­guest­ virtual­hostCurrent active profile: virtual­guest

Page 23: Tuned

Internal Use Only23

Usage: tuned-adm

➢ To check the active profile, type the following commands:

# tuned­adm activeCurrent 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.

Page 24: Tuned

Internal Use Only24

Usage: tuned-adm

➢ To set two profiles at a time, type the following command:

# tuned­adm profile <profile­1> <profile­2>

Eg:

# tuned­adm activeCurrent 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 recommendvirtual­guest

➢ The recommended profile for system is decided according to data in /etc/system­release­cpe and virt­what output.

Page 25: Tuned

Internal Use Only25

Knowledge sources

Documentation:

Fedora Project: Power Management Guidehttp://goo.gl/8uQQBm

Red Hat Enterprise Linux 7.0 Beta: Performance Tuning Guidehttp://goo.gl/Ahjudn

Fedora Hosted: Tuned Quick Start Guidehttps://fedorahosted.org/tuned/

Blog:

Tuning Your System With Tunedhttp://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 Workloadhttps://access.redhat.com/site/videos/898563

Red Hat Enterprise Linux 7 - Using Tuned for Network Latency Applicationshttps://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

Page 26: Tuned

Internal Use Only26

Questions ?