Possible to increase KSM performance?

en4ble

Member
Feb 24, 2023
69
5
8
It seems like KSM performance hit its ceiling at around 170GB (ksmd 100%).

1729867860122.png

I was wondering if there are any ways to increase that?

CPU usage is not a constrain since VMs are more memory intense and they share a lot with each other thus KSM benefit.

I appreciate in advance any suggestions on that matter. If I need to provide more artifacts please let me know.

Code:
/etc/ksmtuned.conf
# Configuration file for ksmtuned.

# How long ksmtuned should sleep between tuning adjustments
# KSM_MONITOR_INTERVAL=60

# Millisecond sleep between ksm scans for 16Gb server.
# Smaller servers sleep more, bigger sleep less.
# KSM_SLEEP_MSEC=100

# KSM_NPAGES_BOOST=300
# KSM_NPAGES_DECAY=-50
# KSM_NPAGES_MIN=64
# KSM_NPAGES_MAX=1250

# KSM_THRES_COEF=20
# KSM_THRES_CONST=2048

# uncomment the following if you want ksmtuned debug info

# LOGFILE=/var/log/ksmtuned
# DEBUG=1
 
I was wondering if there are any ways to increase that?
Sure: use more Ram ;--)

Well..., https://pve.proxmox.com/wiki/Dynamic_Memory_Management#KSM_in_action says: "...(using at least 80% of your physical memory on the host)..." and you are still under this level :)

----
Sidenote: my personal understanding is that I for myself will try really hard not to over-commit memory so much. 165 GB is a lot, even when you have a TiB. Obviously your mileage does vary, which is fine - as long as it works for you :)
 
It seems like KSM performance hit its ceiling at around 170GB (ksmd 100%).

View attachment 76802

I was wondering if there are any ways to increase that?

CPU usage is not a constrain since VMs are more memory intense and they share a lot with each other thus KSM benefit.

I appreciate in advance any suggestions on that matter. If I need to provide more artifacts please let me know.

Try latest 6.8 kernel first
 

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!