I have already read posts related to ulimit on this forum, but don't understand anything, so please do NOT post me as a reply, either links to the forum, either links to proxmox mostly oudated wiki on this subject.
My case is pretty simple. I have a fresh Hetzner dedicated server. And I want to ensure that my heavy loaded production-grade VMs (like MariaDB) will not struggle because of too low "open files limit".
So, I setup Proxmox with the official and latest ISO, to get the best config defaults :
Then I checked file-max on the physical host. Don't know how fs-max is related to ulimit, but the defaults sound good (something unlimited) :
Now i check ulimit hard limits as root on the physical host, I have something like that :
Now i do another check INSIDE the MariaDB container :
The file-max, the ulimit, and the prlimit command print differents values.. But, at this point, Proxmox Staff seems to have done a good job, because the defaults are indeed relevant for a 2020 (now 2021) high performance dedicated server.
My problem is about the ulimit soft limit, both inside a container, and on the physical PVE host :
As you can see, my soft limit is 1024. So i'm afraid that my containers are actually limited to 1024 open files, which is too low, for my needs.
So my questions are :
- is ulimit soft "open files" matters inside a container ?
- how to apply an "open files limit" properly to a given container, and how to check the value ?
- why Proxmox Staff apply such a very low soft ulimit "open files" per default, and do anything else right ?
Please give a clear list of relevant commands to the Proxmox community, on how to increase "open files limit" on both the physical host, and containers !
My case is pretty simple. I have a fresh Hetzner dedicated server. And I want to ensure that my heavy loaded production-grade VMs (like MariaDB) will not struggle because of too low "open files limit".
So, I setup Proxmox with the official and latest ISO, to get the best config defaults :
root@physical:~# pveversion
> pve-manager/6.3-2/22f57405 (running kernel: 5.4.73-1-pve)
Then I checked file-max on the physical host. Don't know how fs-max is related to ulimit, but the defaults sound good (something unlimited) :
cat /proc/sys/fs/file-max
> 9223372036854775807
Now i check ulimit hard limits as root on the physical host, I have something like that :
root@physical:~# ulimit -aH
open files (-n) 1048576
Now i do another check INSIDE the MariaDB container :
root@container:~# prlimit -p 1
NOFILE max number of open files 524288 524288 files
The file-max, the ulimit, and the prlimit command print differents values.. But, at this point, Proxmox Staff seems to have done a good job, because the defaults are indeed relevant for a 2020 (now 2021) high performance dedicated server.
My problem is about the ulimit soft limit, both inside a container, and on the physical PVE host :
root@physical:~# ulimit -aS
open files (-n) 1024
root@container:~# ulimit -aS
open files (-n) 1024
As you can see, my soft limit is 1024. So i'm afraid that my containers are actually limited to 1024 open files, which is too low, for my needs.
So my questions are :
- is ulimit soft "open files" matters inside a container ?
- how to apply an "open files limit" properly to a given container, and how to check the value ?
- why Proxmox Staff apply such a very low soft ulimit "open files" per default, and do anything else right ?
Please give a clear list of relevant commands to the Proxmox community, on how to increase "open files limit" on both the physical host, and containers !
Last edited: