Script to monitor and limit CPU usage on resource intensive VMs

harmonyp

Member
Nov 26, 2020
195
4
23
46
I am seeking out a monitoring script that would limit VMs that are using too much CPU usage over a long period of time.

Example

VM1 (4vCPU 2 core/2thread) uses 80%+ CPU (of total cores allocated) for 24 hours, gets 50% reduction down from 4 vCPU to 2 via CPU Limit

After 6 hours of the CPU no longer being at 80%+ usage the full 4vCPU are restored

Are there any monitoring tools like this? I am unable to find anything on Github
 
I don't have an answer that is backed by thorough knowledge but as far as I know, cpu cores can only be changed upon reboot.

You could try to change the niceness of the respective qm/kvm process on host level, though, so that other processes get a higher priority.
 
I don't have an answer that is backed by thorough knowledge but as far as I know, cpu cores can only be changed upon reboot.

You could try to change the niceness of the respective qm/kvm process on host level, though, so that other processes get a higher priority.
"CPU limit" in this screenshot can be changed without a reboot
c75732371af6fcd092c4a93a5506b48a.png
 
Hm, with my hardware the cpu core count is printed in orange until it becomes black with the next reboot ...
 

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!