How to handle VMs using lots of CPU

Shadow Sysop

Member
Mar 7, 2021
53
3
13
41
I'm still pretty new to Proxmox but have been learning rapidly. I have concerns with some user's VMs utilizing large, continuous amounts of CPU. I have been only allowing 75% for the CPU Limits (eg. A 4 Core VM will have a 3 as CPU limit. a 2 Core VM will have 1.5 as CPU limit). I've also been looking at CPU Units to possibly distribute weighted resources but haven't tried it yet. I notice a 4 Core VM using 100% cores will only utilize 75% of my actual CPU when setting CPU limits (still a bit high imo). Is this a good practice? How does this negatively affect user's VM? Can anyone recommend a better way to address this?
 
You could write a script that runs on the host, logs cpu utilization and dynamically adjusts the CPU limit. As far as I know you could change the CPU limit without stopping the VM.
That way you could give a VM 4 of 4 cores for short high CPU usage peaks but limit it slowly down to 2 of 4 cores on long term heavy CPU usage... maybe someone already coded something like that.
 
Last edited:
  • Like
Reactions: Shadow Sysop
You could write a script that runs on the host, logs cpu utilization and dynamically adjusts the CPU limit. As far as I know you could change the CPU limit without stopping the VM.
That way you could give a VM 4 of 4 cores for short high CPU usage peaks but limit it slowly down to 2 of 4 cores on long term heavy CPU usage... maybe someone already coded something like that.
Yes, you can adjust the CPU limit on a running a VM. This is actually an excellent idea.
 

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!