Enable KSM (Kernel Same-Page Merging) on boot in Debian
I have installed and run Netdata on my Debian based home server and I wanted to enable KSM after Netdata installer suggested it could save some RAM.
To enable the KSM on boot in Debian you I executed these steps:
ksmtunedwithout all the QEMU dependencies:
sudo apt-get install ksmtuned --no-install-recommends
- I actually don't need the
ksmtuned.serviceand I did disabled it:
sudo systemctl stop ksmtuned.service sudo systemctl disable ksmtuned.service
- Finally if:
sudo cat /sys/kernel/mm/ksm/run
0 restart the
sudo systemctl restart ksm.service
How does it start on boot without the service? Anyway, even using this, with the service enabled, the setting doesn't seem to persist across reboots for me, on either of my Ubuntu (should work the same as Debian) devices. Probably unique to my systems, but I've yet to figure out the issue.