I am setting up an OpenVZ node and while everything looks good so far, I am confused as to whether or not KSM works in OpenVZ.

The majority of this thread seems to note that KSM has been disabled due to some sort of conflict. The last person seems to have got it to work, but is using KVM. This is the best info I could find on KSM in OpenVZ.


If I could use OpenVZ with KSM it would be very useful, as I intend to run many near identical processes which require full isolation from each other. Thanks in advance for any pointers which would help me better understand how to approach OpenVZ (or just stick with KVM)!


KSM (Kernel Same Page Merging) is definitely not supported with OpenVZ based kernels. See this source titled: KSM (Kernel Samepage Merging) - Thomas Krenn Wiki.

The virtualization KVM is supporting KSM. Based on this Bug-Report OpenVZ is not supporting it.

The link that excerpt cites is the same one you've included in your question. So given this if you truly want to make use of KSM you'll have to switch your virtualization technology from OpenVZ to KVM, for example.

If you're unsure if a particular kernel was built with KSM support you can use this command to check:

$ grep KSM /boot/config-`uname -r`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.