8.4.2. The KSM Tuning Service
The
ksmtuned
service fine-tunes the kernel same-page merging (KSM) configuration by looping and adjusting ksm
. In addition, the ksmtuned
service is notified by libvirt when a guest virtual machine is created or destroyed. The ksmtuned
service has no options.
systemctl start ksmtuned
# systemctl start ksmtuned
Starting ksmtuned: [ OK ]
The
ksmtuned
service can be tuned with the retune
parameter, which instructs ksmtuned
to run tuning functions manually.
The
/etc/ksmtuned.conf
file is the configuration file for the ksmtuned
service. The file output below is the default ksmtuned.conf
file:
Within the
/etc/ksmtuned.conf
file, npages
sets how many pages ksm
will scan before the ksmd
daemon becomes inactive. This value will also be set in the /sys/kernel/mm/ksm/pages_to_scan
file.
The
KSM_THRES_CONST
value represents the amount of available memory used as a threshold to activate ksm
. ksmd
is activated if either of the following occurs:
- The amount of free memory drops below the threshold, set in
KSM_THRES_CONST
. - The amount of committed memory plus the threshold,
KSM_THRES_CONST
, exceeds the total amount of memory.