KSM is using about 30% of CPU time

Sorry, but this is expected behavior - KSM need to scan the whole memory all the time, so this need CPU (how much can be controlled in the KSM configuration).

A proper "fix" is to decrease time interval KSM scans the memory.

By default, it's 10 ms, a good value for me is 100 ms:

KSM_SLEEP_MSEC=100


If KSM is to "merge" pages, and then unmerge them after 20 ms, and then merge after 10 ms, in reality, you don't save anything but cause CPU load.

Probably worth making it the default value?
 
Yes, maybe. How much memory do you have and what cpu load do you get with this setting (compared to the default)?

I used it on several servers, with 4 - 8 - 12 - 16 - 24 GB RAM.
CPU usage with default values was usually double-digit (on one core); with 100 ms value, it's somewhere between 1-6%.
 

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!