KSM: Difference between revisions
(Updated to 2.6.35 kernel branch) |
|||
Line 28: | Line 28: | ||
=KSM in action= | =KSM in action= | ||
Just install several KVM virtual machines with the same OS (using at least 50 % of your physical memory on the host) and wait a few minutes. you will notice higher CPU activities on the host (ksm daemon) and the used memory on the host will be lowered significantly. | Just install several KVM virtual machines with the same OS (using at least 50 % of your physical memory on the host) and wait a few minutes. you will notice higher CPU activities on the host (ksm daemon) and the used memory on the host will be lowered significantly. | ||
Howto verify that KSM is working (how many pages are being shared between your KVM guests): | |||
<pre>watch cat /sys/kernel/mm/ksm/pages_sharing</pre> | |||
=Links= | =Links= | ||
[[Memory Ballooning]] | [[Memory Ballooning]] | ||
[[Category: HOWTO]][[Category: Technology]] | [[Category: HOWTO]][[Category: Technology]] |
Revision as of 11:15, 1 December 2010
Introduction
Beginning with Proxmox VE 1.5 (only with Kernel 2.6.35 and higher), Proxmox VE uses KSM (Kernel Samepage Merging).
KSM is running in the Linux kernel scanning the memory of all the virtual machines running on a single host, looking for duplication and consolidating. With KSM we're able to improve virtual machine density by as much as 300% without impacting performance. One of the great benefits of using Linux as the hypervisor means KSM is not limited to KVM and virtual machines, but can also reduce memory pressure with normal Linux applications.
Howto enable KSM
Just run the 2.6.35 kernel branch, see Proxmox_VE_Kernel
Check packages version with pveversion -v (all versions should be equal or higher):
pveversion -v pve-manager: 1.6-4 (pve-manager/1.6/5229) running kernel: 2.6.35-1-pve proxmox-ve-2.6.35: 1.6-1 pve-kernel-2.6.35-1-pve: 2.6.35-1 qemu-server: 1.1-19 pve-firmware: 1.0-9 libpve-storage-perl: 1.0-14 vncterm: 0.9-2 vzctl: 3.0.24-1pve4 vzdump: 1.2-7 vzprocps: 2.0.11-1dso2 vzquota: 3.0.11-1 pve-qemu-kvm: 0.12.5-2 ksm-control-daemon: 1.0-4
KSM in action
Just install several KVM virtual machines with the same OS (using at least 50 % of your physical memory on the host) and wait a few minutes. you will notice higher CPU activities on the host (ksm daemon) and the used memory on the host will be lowered significantly.
Howto verify that KSM is working (how many pages are being shared between your KVM guests):
watch cat /sys/kernel/mm/ksm/pages_sharing