Master Linux System Tuning with tuned‑adm: Profiles, Commands & Customization
This guide explains how to install and use the tuned and tuned‑adm tools on RHEL/CentOS 6.3+, lists the built‑in optimization profiles such as laptop‑battery‑powersave and virtual‑host, shows how to apply them, and demonstrates creating custom profiles for specific workloads.
RHEL/CentOS introduced the tuned/tuned‑adm system tuning suite after version 6.3. tuned runs as a daemon that monitors component data and dynamically adjusts settings, while tuned‑adm is a command‑line client for managing profiles.
For laptop users on battery power, the laptop‑battery‑powersave profile can reduce power consumption without deep configuration. Different environments (virtual machines, storage servers, etc.) have pre‑defined profiles, but they may not meet all requirements, so custom profiles can be created.
Installation and startup:
# yum update
# yum install tuned
# service tuned start
# chkconfig tuned on
# service ktune start
# chkconfig ktune onCheck the active profile:
# tuned‑adm active
Current active profile: default
Service tuned: enabled, running
Service ktune: enabled, runningList available profiles:
# tuned‑adm list
Available profiles:
- laptop‑battery‑powersave
- virtual‑guest
- desktop‑powersave
- sap
- server‑powersave
- virtual‑host
- throughput‑performance
- enterprise‑storage
- laptop‑ac‑powersave
- latency‑performance
- spindown‑disk
- default
Current active profile: defaultFor a virtual‑host machine, apply the virtual‑host profile. If the error “kernel.sched_migration_cost is an unknown key” appears, edit /etc/ktune.d/sysctl.ktune to comment or adjust the key.
# tuned‑adm profile virtual-host
Reverting to saved sysctl settings: [ OK ]
Calling '/etc/ktune.d/tunedadm.sh stop': [ OK ]
Reverting to cfq elevator: sda sdb sdc sdd sde sdf sdg [ OK ]
Stopping tuned: [ OK ]
Switching to profile 'virtual-host'
Applying deadline elevator: sda sdb sdc sdd sde sdf sdg [ OK ]
Applying ktune sysctl settings:
/etc/ktune.d/tunedadm.conf: [FAILED]
error: "kernel.sched_migration_cost" is an unknown key
Calling '/etc/ktune.d/tunedadm.sh start': [ OK ]
Applying sysctl settings from /etc/sysctl.conf
Starting tuned: [ OK ]
# vi /etc/tune-profiles/virtual-host/sysctl.ktune
...
#kernel.sched_migration_cost = 5000000
...
# tuned‑adm profile virtual-hostFor enterprise storage servers, the enterprise‑storage profile can be used:
# tuned‑adm profile enterprise-storage
Stopping tuned: [ OK ]
Switching to profile 'enterprise-storage'
Applying deadline elevator: dm-0 sda sdb sdc sdd [ OK ]
Applying ktune sysctl settings:
/etc/ktune.d/tunedadm.conf: [ OK ]
Calling '/etc/ktune.d/tunedadm.sh start': [ OK ]
Applying sysctl settings from /etc/sysctl.conf
Starting tuned: [ OK ]To create a custom profile, copy an existing one (e.g., virtual‑host) to a new directory, edit the parameters, and the new profile (e.g., my‑virtual‑host) will appear in the tuned‑adm list output.
# cd /etc/tune-profiles/
# cp -r virtual-host my-virtual-host
# vi my-virtual-host/*
# tuned‑adm list
Available profiles:
...
- my-virtual-host
Current active profile: virtual-hostSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
