Rachel's Yard| A New Continuation
While I was fiddling around with OpenNebula (more details coming soon), I found that you can actually de-dup memory with KSM. However KSM requires a code base make-over, and of course that's not gonna work on KVM...But then THE CHINESE COMES TO RESCUE. Apparently the Chinese (I'm proud) devs wrote something like ZFS's de-dup but for memory: Ultra Kernel SamePage Merging (yeah the name is totally legit, I have no idea what that "Ultra" means).
If you are running primarily Linux, then you may or may not care. Let say you are running 10 CentOS 7 on a single hypervisor (YES KVM), the kernel memory of each guest is around, let say 20M. Without KSM-optimized code or no KSM, the 10 CentOS guests occupy 200M of memory just for kernel. However, with UKSM, which does not require a total make-over, the 10 CentOS guest quote and quote "Share" that 20M of kernel.
That might not be interesting, but once you start running Windows, oh boy. Windows has an obnoxiously LARGE kernel, like around 500M in my Windows 7 guest. If I were to run 10 Windows 7 guest, that would be just 5GB straight up wasted. But if you have UKSM... You get the idea.
Now I have three Windows 7 guests running on my E3-1230v3, 16GB low density hypervisor node, and UKSM is telling me (uksmstat -m -s) that 1506M of memory are shared, and 3648M of unshared memory (uksmstat -m -u). So technically speaking, if I were to run without UKSM, yeah 4.5G wasted to kernel. THANKS MICROSOFT.
For more information, head to the project website: http://kerneldedup.org/en/
Now if you are ready, as usual, I've compiled kernel for CentOS 7 with UKSM patch:
Just shut up, I have enough bugs with CentOS 6 being too old already, and I'm tired of patching the crap of out the kernel.