Adjusting OOM scores for

Lukasz Biegaj

New Member
May 17, 2019
1
0
1
39
We're running a set of virtual machines for several environments. Unfortunately, sometimes we encounter out-of-memory situations, ofter resulting in termination of kvm/lxc process handling whole machines.

Beside increasing hardware resources, we consider setting up OOM score adjustments, making hypervisor hosts to prefer to terminate dev instances more than production instances.

Our idea consists of a small shell script that integrates with Proxmox API to fetch list of running machines categorised by pools assigned to dev pool and then adjusts oom score for the lxc and kvm processes that are parents of these machines.

In effect, if an out-of-memory situation occurs, development machines would be killed more eager than production instances.

Is this a viable temporary solution? Our Proxmox deployment isn't currently using a subscription but we would like to consider returning to it in future. Would implementing oom_score adjustments scripts interfere with Proxmox or the ability to use a subscription support?
 
Our idea consists of a small shell script that integrates with Proxmox API to fetch list of running machines categorised by pools assigned to dev pool and then adjusts oom score for the lxc and kvm processes that are parents of these machines.

On recent Proxmox VE 5.4 you could reuse the VM/CT start/stop script hooks to do this, see https://pve.proxmox.com/pve-docs/chapter-qm.html#_hookscripts to make the OOM adjustment calls just after it started.


Is this a viable temporary solution? Our Proxmox deployment isn't currently using a subscription but we would like to consider returning to it in future. Would implementing oom_score adjustments scripts interfere with Proxmox or the ability to use a subscription support?

Yes it is a viable solution, and no it should not really be an issue with Enterprise Support, it probably should be mentioned on support requests, though, just that one knows what's up on the system.
 
  • Like
Reactions: Lukasz Biegaj

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!