[solved] KSM-sharing

ITN

Member
Aug 24, 2009
31
0
6
Hi folks,

there are 10 more or less identical WIN7-guests on the PROXMOX-server.
guests.jpg
but KSM-sharing dont works.
ksm.jpg
What`s wrong? Any idea?
Code:
root@server:~# pveversion -v
proxmox-ve-2.6.32: 3.1-114 (running kernel: 2.6.32-26-pve)
pve-manager: 3.1-24 (running version: 3.1-24/060bd5a6)
pve-kernel-2.6.32-26-pve: 2.6.32-114
lvm2: 2.02.98-pve4
clvm: 2.02.98-pve4
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.0-2
pve-cluster: 3.0-8
qemu-server: 3.1-8
pve-firmware: 1.0-23
libpve-common-perl: 3.0-9
libpve-access-control: 3.0-8
libpve-storage-perl: 3.0-18
pve-libspice-server1: 0.12.4-2
vncterm: 1.1-6
vzctl: 4.0-1pve4
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.4-17
ksm-control-daemon: 1.1-1
glusterfs-client: 3.4.1-1

thnx @all
 
Last edited:
Re: KSM-sharing

Thank you for reply

root@server:~# watch cat /sys/kernel/mm/ksm/pages_sharing
Every 2.0s: cat /sys/kernel/mm/ksm/pages_sharing Tue Feb 11 14:42:58 2014

0

Thats all. :-(
 
Re: KSM-sharing

ksm2.jpg
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.
 
Last edited:
Re: KSM-sharing

like the 50% in the quoted wiki page suggests, theres a threshold that you need to hit before KSM starts doing anything. KSM requires CPU cycles, so theres no point in running KSM if you have a lot of free memory anyhow
 
Re: KSM-sharing

I feel like have read somewhere that the 50% threshold is the default, but can be changed... if only I could remember where... :)

Marco
 
Re: KSM-sharing

the defaut threhold is 80% of ram used on host.

(Because ksm use some cpu to scan pages, it's disabled by default and only begin to scan page when host reach 80% of used ram).

This can be tuned in /etc/ksmtuned.conf
 
Re: KSM-sharing

the defaut threhold is 80% of ram used on host.

(Because ksm use some cpu to scan pages, it's disabled by default and only begin to scan page when host reach 80% of used ram).

This can be tuned in /etc/ksmtuned.conf

To be more elaborate, KSM_THRES_COEF is 20 by default. But this values refers to the amount of 'free' memory, so
KSM is started if (free_memory < (KSM_THRES_COEF*total/100)).
 
  • Like
Reactions: giovannik
Re: KSM-sharing

i have total memory 31,45
20*31,45/100=6,29

KSM started if free_memory<6,29 right?
 
Re: KSM-sharing

To be more elaborate...

Dietmar I saw you changed the KSM page updating the default threshold to 80%, But at top that page says it's obsolete, in favor of http://pve.proxmox.com/wiki/Dynamic_Memory_Management, which has similar content (but not all), and still says 50%.

It would be better to move all correct content to this last page, and then make a redirect from the first? If you agree, i could make this.

Marco
 
Re: KSM-sharing

It would be better to move all correct content to this last page, and then make a redirect from the first? If you agree, i could make this.

Ok, I changed the info on that page also. Feel free to add further improvements.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!