public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server 0/1] increase qemu max openfiles limit
@ 2023-12-10 14:49 Alexandre Derumier
  2023-12-10 14:49 ` [pve-devel] [PATCH qemu-server 1/1] fix #4507 : " Alexandre Derumier
  0 siblings, 1 reply; 8+ messages in thread
From: Alexandre Derumier @ 2023-12-10 14:49 UTC (permalink / raw)
  To: pve-devel

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




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-12-12 12:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-10 14:49 [pve-devel] [PATCH qemu-server 0/1] increase qemu max openfiles limit Alexandre Derumier
2023-12-10 14:49 ` [pve-devel] [PATCH qemu-server 1/1] fix #4507 : " Alexandre Derumier
2023-12-11  9:46   ` Fiona Ebner
2023-12-11 16:29     ` DERUMIER, Alexandre
2023-12-12  9:21       ` Fiona Ebner
2023-12-12 11:10         ` DERUMIER, Alexandre
2023-12-12 11:55         ` Thomas Lamprecht
2023-12-12 12:20           ` Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal