qemu 5.2+ and ulimit

29 views
Skip to first unread message

Andrew Bezella

unread,
Apr 19, 2023, 7:55:48 PM4/19/23
to ganeti
hello  -

in testing ganeti 3.0.2 on ubuntu jammy/22.04 we ran into an apparent issue w/the ulimit setting.  attempts to start a vm with 14 disks failed with EMFILE 24 Too many open files:
kvm: virtio-blk failed to set guest notifier (-24), ensure -accel kvm is set. kvm: virtio_bus_start_ioeventfd: failed. Fallback to userspace (slower). kvm: virtio-blk failed to set guest notifier (-24), ensure -accel kvm is set. kvm: virtio_bus_start_ioeventfd: failed. Fallback to userspace (slower). kvm: virtio-blk failed to set guest notifier (-24), ensure -accel kvm is set. kvm: virtio_bus_start_ioeventfd: failed. Fallback to userspace (slower). kvm: ../../hw/block/virtio-blk.c:1043: virtio_blk_set_status: Assertion `!s->dataplane_started' failed.


according to Red Hat Bugzilla – Bug 1902548 there is a regression introduced by QEMU 5.2 (jammy has QEMU emulator version 6.2.0) that greatly increased the number of open file descriptors.  the recommendation is to increase NOFILE limit for the QEMU process.

i add a ulimit line to the start_all function in the init script (diff attached) and that seems to be sufficient.  i think systemd enforces a 524288 hard limit when translating to a unit file.

hth,
  andy
local-ulimit.patch

Sascha Lucas

unread,
Apr 20, 2023, 3:10:58 PM4/20/23
to ganeti
Hi Andy,

On Wed, 19 Apr 2023, Andrew Bezella wrote:

> according to Red Hat Bugzilla – Bug 1902548
> <https://bugzilla.redhat.com/show_bug.cgi?id=1902548#c16> there is a
> regression introduced by QEMU 5.2 (jammy has QEMU emulator version 6.2.0)
> that greatly increased the number of open file descriptors. the
> recommendation is to increase NOFILE limit for the QEMU process.

Thanks for discovering. I create github issue 1705[1], so that we won't
forget to fix this.

Thanks, Sascha.

[1] https://github.com/ganeti/ganeti/issues/1705
Reply all
Reply to author
Forward
0 new messages