[pve-devel] [PATCH qemu-server 0/1] increase qemu max openfiles limit
Alexandre Derumier
aderumier at odiso.com
Sun Dec 10 15:49:39 CET 2023
Hi,
The current qemu max openfile limit is 1024.
This is really to low it you use ceph storage through librbd.
For each disk, qemu process is doing 1 tcp connection to each osd.
I have trigger a bug this week, a vm with 6 disk and a cluster with 100 osd,
At boot vm was working fine, but after some time, vm begin to do random disk access
timeout. The number of connection was around 600~700.
Also the qemu monitor/qemu-agent was hanging too.
Other users have also reported this bug:
https://forum.proxmox.com/threads/vm-qmp-command-failed-vm-qmp-command-query-proxmox-support-failed.90160/#post-613685
https://forum.proxmox.com/threads/qemu-crash-with-vzdump.131603/
https://bugzilla.proxmox.com/show_bug.cgi?id=4507#c1
This patch use prlimit command to increase the limit after vm start.
I don't have found a way to increase it in the qemu scope directly with LimitNOFILE.
Alternative fix is to increase max openfile globally with
if vm is launched through gui:
/etc/systemd/system.conf.d/max-open-files.conf
[Manager]
DefaultLimitNOFILE=524289:524289
if vm is launched through ssh with qm:
/etc/security/limits.d/10-max-open-files.conf
root - nofile 524289
But maybe users could already have tuned it for containers,
so I think it's better to only change limit for qemu process.
Alexandre Derumier (1):
fix #4507 : increase qemu max openfiles limit
PVE/QemuServer.pm | 6 ++++++
1 file changed, 6 insertions(+)
--
2.39.2
More information about the pve-devel
mailing list