[fedora-virt] disable KSM in fedora 16?

Justin M. Forbes jmforbes at linuxtx.org
Thu Nov 10 02:13:38 UTC 2011


On Wed, 2011-11-09 at 20:40 -0500, Tom Horsley wrote:
> I have lots of memory for the virtual machines I run.
> Any work at all that KSM does will be a waste of time,
> but on fedora 16 there does not appear to be a KSM
> service I can disable with either chkconfig or the
> systemd tools, yet ksmd is running.
> 
> How the heck do I disable it? (Or is that a lost cause,
> and I might as well just go ahead and let it run :-).

Turning it off isn't so much the desirable piece as making sure ksmtuned
is running so that it only scans when needed.  ksmtuned is quite a bit
more efficient.  Make sure your qemu is at 0.15.1-2 and you can control
the ksm and ksmtuned services with systemctl on ksm.service and
ksmtuned.service.
If you really want to turn off ksm, make sure to disable the ksm and
ksmtuned services, and echo 0 > /sys/kernel/mm/ksm/run after boot. the
ksmd kernel thread will exist, but it shouldn't actually do anything.

Justin



More information about the virt mailing list