ksm-control-daemon vs ksmtuned installation

Ansy

Well-Known Member
Dec 20, 2018
46
7
48
52
I've usually installed Proxmox VE two ways:
  1. using downloaded official ISO image (flash drive, "bare metal")
  2. using apt install proxmox-ve over the Debian 10 on Hetzner dedicated server (Instruction).
Then I've noticed not working KSM in second case... yes, ksm-control-daemon wasn't installed!

But while investigating the issue I've already installed ksmtuned package first and started ksm.service and ksmtuned.service.
Now I can't get working KSM having these messages in Package Versions:
ksm-control-daemon: 1.3-1
ksmtuned: not correctly installed

And I can-t resolve apt conflict due to /etc/ksmuned.conf used in both packages.

Question is: how to get things fixed and working now and in the future?

P.S. https://bugzilla.proxmox.com/show_bug.cgi?id=3219
 
Last edited:
I also found ksm missing after manually installing proxmox-ve on a debian 10.6.

I did this to get it working. From my notes:
apt-get install -y ksmtuned
nano /etc/ksmtuned.conf
Optimize this for your RAM size. I used 40ms for 64GB RAM:
KSM_SLEEP_MSEC=40
I edited KSM_THRES_COEF so it will start working if RAM is 60% full (default would be 80%):
KSM_THRES_COEF=40
systemctl enable ksmtuned
systemctl start ksmtuned
systemctl enable --now ksm.service
I think I'm not using that ksm-control-daemon.
 
Last edited:
I also found ksm missing after manually installing proxmox-ve on a debian 10.6.

I did this to get it working. From my notes:

I think I'm not using that ksm-control-daemon.
Well, it's original ksm service. BTW, is it displaying something other than 0 in KSM field of Proxmox VE web interface?

I've spoke more about ksm-control-daemon package usually added by PVE installation ISO image. Are you managed to get it worked?
I've run some commands like (don't remember exactly):
apt remove ksm-control-daemon
apt remove ksmtuned
apt purge ksmtuned
apt clean ksmtuned
apt autoclean ksmtuned
and then:
apt reinstall ksm-control-daemon
systemctl enable ksmtuned
I see ksmtuned working now, there are some debug lines (logs are switched on) but no more than 0 MB in PVE web interface KSM field.
 
  • Like
Reactions: pizza
Well, it's original ksm service. BTW, is it displaying something other than 0 in KSM field of Proxmox VE web interface?
I've got 64GB RAM and 83% of that RAM is used. The WebGUI shows this:
KSM sharing 9.39 GiB

Ksmtuned only starts working if the threshold is exeeded. By default it will only run if your hosts RAM is over 80% used. As long as more then 20% of your RAM are free it will be deactivated. If you want it to be activated earlier you need to change the "KSM_THRES_COEF" value in "/etc/ksmtuned.conf". If you change it to "KSM_THRES_COEF=100" KSM should be active all the time.


I've spoke more about ksm-control-daemon package usually added by PVE installation ISO image. Are you managed to get it worked?
I checked the installed packages and "ksm-control-daemon" isn't installed here. Looks like that wasn't a dependency of the "proxmox-ve" package and I never installed it.
 
Last edited:

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!