Optimizing Linux

Most Linux systems run well since Linux is not an intensive Operating System (OS) as others.For some systems though, the system may not be optimized to provide great performance.

The performance can depend on how the system is being used. Two identical systems can show different speeds depending on how that system is being used. Performance enhancements can be changed to remedy how the resources are used by the system.

Tuned Daemon Installation

We will install a program called ‘tuned’ which can optimize the system dynamically or statically.

Before we worry about optimizing the system, let’s get the daemon installed. Perform the following command:

sudo apt install tuned tuned-utils tuned-utils-systemtap

After installation, you can verify the daemon is running with the command:

sudo systemctl status tuned

You can also make sure the daemon starts after every reboot automatically (this is done during install, but you can make sure):

sudo systemctl enable tuned

Tuning Profiles

There are profiles that are already included with Tuned. The command ‘tuned-adm list’ will list all of the available profiles and then list the current active profile. Each OS may present varying profiles. The default profile is ‘balanced’, unless the daemon finds a better one. For example, if you install ‘tuned’ on a virtual box client, the default will be ‘virtual-guest’.

– atomic-guest – Optimize virtual guests based on the Atomic variant
– atomic-host – Optimize bare metal systems running the Atomic variant
– balanced – General non-specialized tuned profile
– cpu-partitioning – Optimize for CPU partitioning
– default – Legacy default tuned profile
– desktop – Optimize for the desktop use-case
– desktop-powersave – Optimize for the desktop use-case with power saving
– enterprise-storage – Legacy profile for RHEL6, for RHEL7, please use throughput-performance profile
– laptop-ac-powersave – Optimize for laptop with power savings
– laptop-battery-powersave- Optimize laptop profile with more aggressive power saving
– latency-performance – Optimize for deterministic performance at the cost of increased power consumption
– network-latency – Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
– network-throughput – Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
– oracle – Optimize for Oracle RDBMS
– powersave – Optimize for low power consumption
– realtime – Optimize for realtime workloads
– realtime-virtual-guest – Optimize for realtime workloads running within a KVM guest
– realtime-virtual-host – Optimize for KVM guests running realtime workloads
– sap-hana – Optimize for SAP HANA
– sap-hana-vmware – Optimize for SAP HANA running inside a VMware guest
– sap-netweaver – Optimize for SAP NetWeaver
server-powersave – Optimize for server power savings
– spindown-disk – Optimize for power saving by spinning-down rotational disks
– throughput-performance – Broadly applicable tuning that provides excellent performance across a variety of common server workloads
– virtual-guest – Optimize for running inside a virtual guest
– virtual-host – Optimize for running KVM guests

NOTE: The list is taken from an Ubuntu 18.04 Desktop client running in Oracle VirtualBox.

To find just the current profile being used by the system, use the command ‘sudo tuned-adm active’.

If the system usage has changed since the initial install of ‘tuned’, you can have the daemon re-detect a profile with the command:

sudo tuned-adm recommend

To change the current profile to the recommended one, use the command:

sudo tuned-adm profile <new-profile-name>

So, let’s assume after installation, the default profile was ‘balanced’. After the system has changed, the recommendation was ‘’network-throughput’. To change the profile, the command would be ‘sudo tuned-adm profile network-throughput’.

To verify any changes, just use the command ‘sudo tuned-adm active’. The result should be the new profile you set.

To see specific information on a profile, use the command ‘tuned-adm profile_info <profile-name>’

The recommended profile does not necessarily have to be active. You can choose any profile you wish. Change the profiles and see what happens.

Creating Profiles

Before creating your own profiles, you can look over the profiles installed with the ‘tuned’ package.

The profiles are stored in two separate locations. Some of the main settings are located in ‘/etc/tuned/’. The profiles themselves, are in ‘/usr/lib/tuned/<profile-name>/tuned.conf’. The settings in ‘/etc/tuned/’ are included in the profiles, by calling them, in ‘/usr/lib/tuned/’.

To create a new profile, you need to create a folder in ‘/usr/lib/tuned/’. The best way is to copy a profile that is similar to what you want. Copy the ‘tuned.conf’ file into the newly created folder. Edit the configuration file and make the changes you need. The folder name should then be the new profile name.

Make sure you change the ‘summary’ line under the ‘[main]’ section. The line is used to give the description when listing the profiles.

When loading a profiles, errors are listed when activating a new profile. If errors occur, the profile is not loaded.

Disabling Tuned Profiles

If you wish to stop using any profiles, you can run the command ‘sudo tuned-adm off’.

At this point, the tuned daemon is still running, but there are no active profiles.

Profiles can be activated at any time that you wish, until then, the system is running ‘unoptimized’ as it was before the tuned daemon was installed.

If you really do not want to run any profiles, but stop the daemon, you can use the command ‘sudo systemctl stop tuned’. If you also want to make sure it does not automatically start when the system reboots, use the command ‘sudo systemctl disable tuned’.

If you want to uninstall tuned, you can use the command ‘sudo apt remove tuned tuned-utils tuned-utils-systemtap’.


The tuned tool can be useful to help optimize some systems. It may be more beneficial for those systems used in a live environment more so than one used in a home.

Sometimes, it never hurts to try optimizing a system if you do have some performance issues. Try various profiles and see what may work best for you.

Posted by Linux Admin