Tuning your system's performance

Companies buy the best hardware their money can get, and they want to use everything optimally. However, it's not just the hardware that makes your applications run faster. Your OS will also behave differently under specific circumstances.

Tuned is a set of tools and a daemon that tunes your system's settings automatically depending on its usage. It periodically collects data from its components through plugins, which it uses to change system settings according to the current usage.

How to do it…

In this recipe, we'll ask tuned which profile to use and apply it through the following steps:

  1. First, run the following command to install the required packages:
    ~]# yum install -y tuned
    
  2. Enable and start tuned by executing the following commands:
    ~]# systemctl enable tuned
    ~]# systemctl restart tuned
    
  3. Have tuned guess the profile to be used via the following:
    ~]# tuned-adm recommend
    virtual-guest
    
  4. Finally, apply the recommended profile to tuned, as follows:
    ~]# tuned-adm profile virtual-guest
    

There's more…

You can find the system's tuned profiles used in /lib/tuned/. When you create your own, create them in /etc/tuned in the same way as they are organized in /lib/tuned. I do not recommend creating new profiles in /etc/tuned with the same name as in /lib/tuned, but if you do, the one in the /etc/tuned directory will be used. It is better to create a new one with a different name, including the one you want to modify, and then make the necessary changes in your new profile.

Every profile has a directory, which contains a set of files controlling the behavior of your system. If you explore the tuned.conf files in these directories, you will see that these files define the exact settings that other tools (such as cpufreq) need to be configured on and that some profiles include other profiles. For instance, if you create a profile for, say, a laptop that is a little better on the battery by applying the powersave CPU governor, you could create a new file located at /etc/tuned/laptop/tuned.conf containing the following:

#
# laptop tuned configuration
#

[main]
include=desktop

[cpu]
replace=1
governor=powersave

When you know the bottlenecks of your systems, you can find out how to mitigate them by configuring your system in a specific way. Tuned can come in handy to create and apply profiles based on the performance monitoring of your components.

See also

For more information about tuning your system, refer to the Red Hat Performance Tuning guide at https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Performance_Tuning_Guide/index.html.

Check out the man pages of tuned (8), tuned-adm (8), tuned-main.conf (5), and tuned.conf (5) for more information.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset