all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 0/1] increase qemu max openfiles limit
Date: Sun, 10 Dec 2023 15:49:39 +0100	[thread overview]
Message-ID: <20231210144940.2031248-1-aderumier@odiso.com> (raw)

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




             reply	other threads:[~2023-12-10 14:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-10 14:49 Alexandre Derumier [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231210144940.2031248-1-aderumier@odiso.com \
    --to=aderumier@odiso.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal