Adjusting OOM scores for

Discussion in 'Proxmox VE: Installation and configuration' started by Lukasz Biegaj, May 17, 2019.

  1. Lukasz Biegaj

    Lukasz Biegaj New Member

    Joined:
    May 17, 2019
    Messages:
    1
    Likes Received:
    0
    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?
     
  2. t.lamprecht

    t.lamprecht Proxmox Staff Member
    Staff Member

    Joined:
    Jul 28, 2015
    Messages:
    1,279
    Likes Received:
    183
    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.


    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Lukasz Biegaj likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice