KSM

From Proxmox VE
Revision as of 15:31, 13 February 2010 by Martin (talk | contribs) (added pveversion -v)
Jump to navigation Jump to search

Introduction

Beginning with Proxmox VE 1.5 (only with Kernel 2.6.32 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.32 kernel branch, see Proxmox_VE_Kernel

Check packages version with pveversion - (all versions should be equal or higher):

pveversion -v

pve-manager: 1.5-7 (pve-manager/1.5/4660)
running kernel: 2.6.32-1-pve
proxmox-ve-2.6.32: 1.5-4
pve-kernel-2.6.32-1-pve: 2.6.32-6
qemu-server: 1.1-11
pve-firmware: 1.0-3
libpve-storage-perl: 1.0-10
vncterm: 0.9-2
vzctl: 3.0.23-1pve8
vzdump: 1.2-5
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.11.1-2
ksm-control-daemon: 1.0-3

KSM in action

Just install several KVM virtual machines (using at least 50 % of your physical memory on the host) and wait. you will notice higher CPU activities on the host and the used memory will be lowered.