Tuned – Automatic Performance Tuning of CentOS/RHEL Servers

To maximize the end-to-end performance of services, applications and databases on a server, system administrators usually carry out custom performance tunning, using various tools, both generic operating system tools as well as third-party tools. One of the most useful performance tuning tools on CentOS/RHEL/Fedora Linux is Tuned.

Read Also: 20 Commad Line Tools Monitor Linux Performance

Tuned is a powerful daemon for dynamically auto-tuning Linux server performance based on information it gathers from monitoring use of system components, to squeeze maximum performance out of a server.

It does this by tuning system settings dynamically on the fly depending on system activity, using tuning profiles. Tuning profiles include sysctl configs, disk-elevators configs, transparent hugepages, power management options and your custom scripts.

By default tuned will not dynamically adjust system settings, but you can modify how the tuned daemon operates and allow it to dynamically alter settings based on system usage. You can use the tuned-adm command-line tool to manage the daemon once it is running.

How to Install Tuned on CentOS/RHEL & Fedora

On CentOS/RHEL 7 and Fedora, tuned comes pre-installed and activated by default, but on older version of CentOS/RHEL 6.x, you need to install it using the following yum command.

# yum install tuned

After the installation, you will find following important tuned configuration files.

  • /etc/tuned – tuned configuration directory.
  • /etc/tuned/tuned-main.conf– tuned mail configuration file.
  • /usr/lib/tuned/ – stores a sub-directory for all tuning profiles.

Now you can start or manage the tuned service using following commands.

--------------- On RHEL/CentOS 7 --------------- 
# systemctl start tuned	        
# systemctl enable tuned	
# systemctl status tuned	
# systemctl stop tuned		

--------------- On RHEL/CentOS 6 ---------------
# service tuned start
# chkconfig tuned on
# service tuned status
# service tuned stop

Now you can control tuned using the tunde-adm tool. There are a number of predefined tuning profiles already included for some common use cases. You can check the current active profile with following command.

# tuned-adm active

From the output of the above command, the test system (which is a Linode VPS) is optimized for running as a virtual guest.

Check Current Tuned Profile
Check Current Tuned Profile

You can get a list of available tuning profiles using following command.

# tuned-adm list
List Available Tuned Profiles
List Available Tuned Profiles

To switch to any of the available profiles for example throughput-performance – a tuning which results into excellent performance across a variety of common server workloads.

# tuned-adm  profile throughput-performance
# tuned-adm active
Switch to Tuning Profile
Switch to Tuning Profile

To use the recommended profile for your system, run the following command.

# tuned-adm recommend

And you can disable all tuning as shown.

 
# tuned-adm off

How To Create Custom Tuning Profiles

You can also create new profiles, we will create a new profile called test-performance which will use settings from an existing profile called latency-performance.

Switch into the path which stores sub-directories for all tuning profiles, create a new sub-directory called test-performance for your custom tuning profile there.

# cd /usr/lib/tuned/
# mkdir test-performance

Then create a tuned.conf configuration file in the directory.

# vim test-performance/tuned.conf

Copy and paste the following configuration in the file.

[main]
include=latency-performance
summary=Test profile that uses settings for latency-performance tuning profile

Save the file and close it.

If you run the tuned-adm list command again, the new tuning profile should exist in the list of available profiles.

# tuned-adm list
Check New Tuned Profile
Check New Tuned Profile

To activate new tuned profile, issue following command.

# tuned-adm  profile test-performance

For more information and further tinkering options, see the tuned and tuned-adm man pages.

# man tuned
# man tuned-adm

Tuned Github repository: https://github.com/fcelda/tuned

That’s all for now! Tuned is a daemon that monitors usage of system components and dynamically auto-tunes a Linux server for maximum performance. If you have any questions or thoughts to share, use the feedback form below to reach us.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

5 thoughts on “Tuned – Automatic Performance Tuning of CentOS/RHEL Servers”

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.