[nova] nova hypervisor oom killed some openstack guest

Clark Boylan cboylan at sapwetik.org
Wed Jul 20 23:15:47 UTC 2022

On Wed, Jul 20, 2022, at 4:04 PM, hai wu wrote:
> After installing some systemd package, and starting up machine.slice,
> systemd-machined, and hard rebooting the vm from openstack side, I
> could now see the VM showing up under machine.slice. all vms were
> showing up under libvirtd.service, which is under system.slice.
> What are the benefits of running libvirt managed guest instances under
> machine.slice?

You can use machine.slice to set system resource options that each sub slice inherits. Those options are documented at https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html# (per my earlier link https://www.freedesktop.org/software/systemd/man/systemd.slice.html). I don't see OOMScoreAdjust listed there so I am unsure if you can actually set it via this method.

That all said, if you are oversubscribing memory this is likely to always be an issue. If you adjust the oom score for your VMs then the oomkiller is just going to find other victims to kill. Losing your nova compute agent or NetworkManager or iscsid may be just as problematic. Instead, I suspect that you may need to stop oversubscribing memory.

> On Wed, Jul 20, 2022 at 5:53 PM Clark Boylan <cboylan at sapwetik.org> wrote:
>> On Wed, Jul 20, 2022, at 3:17 PM, hai wu wrote:
>> > Is there any configuration file that is needed to ensure guest domains
>> > are under systemd machine.slice? not seeing anything under
>> > machine.slice ..
>> I think that https://www.freedesktop.org/software/systemd/man/systemd.slice.html and https://libvirt.org/cgroups.html covers this for libvirt managed VMs.
>> >
>> > On Wed, Jul 20, 2022 at 3:33 PM Dmitriy Rabotyagov
>> > <noonedeadpunk at gmail.com> wrote:
>> >>
>> >> I believe you can decrease OOMScoreAdjust for systemd machines.slice, under which guest domains are to reduce chances of oom killing them.
>> >>
>> >> ср, 20 июл. 2022 г., 21:52 hai wu <haiwu.us at gmail.com>:
>> >>>
>> >>> nova hypervisor sometimes oom would kill some openstack guests.
>> >>>
>> >>> Is it possible to not allow kernel to oom kill any openstack guests?
>> >>> ram is not oversubscribed much ..
>> >>>

More information about the openstack-discuss mailing list