$ run as a normal user# run as root (or with sudo)
The quick answer
Step by step
- Install and start (RHEL has it; Debian/Ubuntu:
apt install tuned):systemctl enable --now tuned. - See the active profile and the recommendation (lines 1–2) — tuned recommends based on the hardware (for example
virtual-guestin a VM). - Common profiles —
tuned-adm listshows all:virtual-guest— VMs (lower swappiness, throughput settings).throughput-performance— servers with heavy load.latency-performance/network-latency— low latency, more power use.powersave/balanced— laptops, idle machines.
- Switch (line 3) — applies at once and stays after reboot.
- Check it is really applied (line 4) —
verifycompares the current system with the profile and reports differences (for example a value someone changed by hand). - Custom profile — keep the standard profile and change only a few values:
[main]
summary=Database server on a VM
include=virtual-guest
[sysctl]
vm.swappiness=5
vm.dirty_ratio=10
[vm]
transparent_hugepages=nevertuned-adm profile db-server- Measure — compare the app's response times or throughput before and after; keep the profile only if it helps.
Check that it worked
tuned-adm active prints Current active profile: db-server; tuned-adm verify says Verification succeeded, current system settings match the preset profile; sysctl vm.swappiness prints 5; after a reboot the profile is still active.
Common problems
| Problem | Cause | Fix |
|---|---|---|
Cannot talk to TuneD daemon | Service not running. | systemctl enable --now tuned. |
verify fails | A value was changed by hand or by another tool. | Find the other setting (sysctl file, script); keep one source. |
| sysctl file values overwritten | tuned and /etc/sysctl.d set the same key. | Set each key in one place only. |
| No change in a container | Containers cannot change most host settings. | Run tuned on the host. |
| Custom profile not listed | Wrong folder or file name. | /etc/tuned/NAME/tuned.conf. |
| Worse performance | Wrong profile for the workload. | Measure; go back with tuned-adm profile or recommend. |
Go further
- Command pages: tuned-adm, sysctl.
- Next how-tos: Change kernel settings with sysctl, Find out why a server is slow, Change the priority of a process, Tune PostgreSQL memory settings.
- Learn it: RHCSA — tuned, RH134 — tuned profiles, RH134 — Custom profile.
1What does tuned-adm recommend do?
It suggests the profile that fits the hardware, for example virtual-guest inside a VM.
2How do you change a few values without losing a standard profile?
Create a custom profile with include= of the standard profile and only the changed values.