Summary
There are 3 directories responsible for system tuning.
/proc/sys⇐ contians the current system parameters/etc/sysctl.d/⇐*.confif you write the system parameter to a conf file inside this it will be persistent/etc/tuned/
/etc/tuned/main.conf⇐ has settings about tuned/etc/tuned/profiles/<profile>/main.conf⇐ you can create tuned profiles like this
- we use
tunedto do system tuning inRHEL - Kernel tunables are provided through the
/proc/sysdirectory in the/procpseudo file system
- if you want to see all the system tuning parameters,
sysctl -a-
this will show all the parameters,

-
to see how many parameters are there

-
if you want to see the value of a parameter,

-
Different files in the
/proc/sysdirectory contain the current setting as its value

-
Change the current value by echoing a new value into the file:
echo 40 > /proc/sys/vm/swappiness-
but if you write to
/proc/sysit is not persistent. -
To make settings persistent, write them to a file in
/etc/sysctl.d:

-
now this will persist even after a reboot.
-
if you want to make it available immedietly then you have to use
sysctl -p
sysctl -p /etc/sysctl.d/swappiness.confor you can use
sysctl --system

-
since there are a lot of tunable parameters, it is hard to manage all of them just by writing to files.
-
To make system tuning easier,
tunedis provided -
tunedis a systemd service that works with different profilestuned-adm listshows current profiles
-
tuned-adm profile virtual-guestsets another profile as default.
-
to see the active profile you can use
tuned-adm active- Each profile contains a file with the name
tuned.conf, that has a wide range of performance related settings
- After creating the directory with the corresponding tuned.conf, it will automatically be picked up
- if you want to see recommend tuned profile
tuned-adm recommend
-
The
reapply_sysctl = 1parameter in/etc/tuned/tuned-main.confensures that, in case of conflict, the sysctl parameter wins
-
tuned --helpwill provide an overview of all the commands that you can use.
-
if you want to create your own tuned profile you can create it like this

-
you only need to create the profile. it will automatically will be picked up by
tuned -
remember
sysctlwill win overtuned. if you want to change that behavior you have to setreapply_sysctl = 0in/etc/tuned/main.conf
How to see all the tunables in a systemd units?
systemctl show httpd.service
