As a system administrator, you should be able to optimize the performance of your Linux system by adjusting various settings to suit your use case workload. This guide was written to help you optimize and optimize the performance of your Linux server.
of Tune up Daemons can be used to apply system adjustments dynamically or statically. There are predefined tuning profiles that reflect specific workload requirements.
The available profiles you can adjust to are:
|balanced||Ideal for systems that seek a compromise between energy savings and performance.|
|desktop||From the balance profile. Provides faster response time for interactive applications.|
|Throughput performance||Tune the system for maximum throughput.|
|Delay performance||Ideal for server systems that require low latency at the cost of power consumption.|
|Network latency||From the latency performance profile. It enables other network tuning parameters to provide lower network latency.|
|Network throughput||Derived from the throughput performance profile. Additional network tuning parameters are available for maximum network throughput.|
|Energy saving||Adjust your system to maximize power savings.|
|Oracle||Optimized for Oracle database load based on throughput performance profile.|
|Virtual guest||Optimized to run in virtual guests|
|Web hosting||If used to run KVM guests, adjust the system for best performance|
So let’s look at two system tuning modes.
In this adjustment method, Tune up The daemon applies system settings when the service starts or when a new tuning profile is selected. It configures predefined kernel parameters in a configuration file, Tuning applies at runtime. Kernel parameters are set for overall performance expectations and are not adjusted as activity levels change.
With dynamic adjustments, the adjusted daemon can monitor system activity and adjust settings based on changes in runtime behavior. Dynamic adjustments start with the initial settings declared in the selected adjustment profile and continuously adjust to the current workload.
In RHEL / CentOS 8/7 Linux systems, the adjusted packages are installed and enabled by default. If you want to manually install and enable packages on a CentOS / RHEL machine, run the following command:
sudo yum install tuned sudo systemctl enable --now tuned
sudo apt update sudo apt install tuned tuned-utils tuned-utils-systemtap
Confirm the service status after startup.
$ systemctl status tuned ● tuned.service - Dynamic System Tuning Daemon Loaded: loaded (/usr/lib/systemd/system/tuned.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2020-02-04 04:10:52 UTC; 6 days ago Docs: man:tuned(8) man:tuned.conf(5) man:tuned-adm(8) Main PID: 936 (tuned) CGroup: /system.slice/tuned.service └─936 /usr/bin/python2 -Es /usr/sbin/tuned -l -P .....
Select adjustment profile
The adjusted configuration files are divided into the following categories:
- Performance Boost Profile
- Energy-saving profiles
Performance improvement profiles include profiles that focus on:
- Low latency for storage and networking
- High-throughput storage and networking
- Web hosting performance
- Virtual machine performance
We will use tuning Command to change the settings of the adjusted daemon.
Check the currently active tuning profile:
$ tuned-adm active Current active profile: virtual-guest
of Adjusted ad list The command is used to list all available tuning profiles:
Available profiles: - balanced - General non-specialized tuned profile - desktop - Optimize for the desktop use-case - 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 - powersave - Optimize for low power consumption - 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 Current active profile: virtual-guest
On Ubuntu, more configuration files are available:
$ tuned-adm list Available profiles: - 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 - Optmize 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
tuned-adm configuration file
sudo tuned-adm profile throughput-performance
Confirm the current profile.
$ sudo tuned-adm active Current active profile: throughput-performance
Check system recommended adjustment profile
The tuned-adm command can also suggest system tuning profiles. This is based on various system characteristics, including whether the system is a virtual machine and other predefined categories selected during system installation.
$ tuned-adm recommend virtual-guest
You can then set your profile to a recommended value.
sudo tuned-adm profile virtual-guest
To view the profile details, run:
$ tuned-adm profile_info virtual-guest Profile name: virtual-guest Profile summary: Optimize for running inside a virtual guest Profile description:
To revert setting changes made by the current profile, switch to another profile or deactivate the tuned daemon.
Use the tuned-adm off command to turn off tuned tuning activities:
$ tuned-adm off
Confirm with the following command:
$ tuned-adm active
You can also use the Cockpit Web console to manage adjustment profiles.
Running CentOS 8 VM with Vagrant on KVM / VirtualBox / VMWare / Parallels
Retain system journal records with persistent storage
Enable Hyper-V on Windows 10 and install Vagrant