I am on an Ubuntu18.04.1 bionic VM in the Azure cloud. I am trying to set the maximum number of file descriptors at the system level.
When I initially logged in and ran ulimit -n
I get a value of 1024. So I checked the /etc/security/limits.conf
, but there was no configuration in it. So I thought maybe its configured that way in cat /proc/sys/fs/file-max
, so when I checked that out it was set to 1426416. So question 1: Where is 1024 coming from?
I was able to change it by setting some entries in /etc/security/limits.conf
for nofile
for * and root domains and I bumped it to 65536 and now ulimit -n
reflects it. So my question no 2: What is purpose of the entry in /proc/sys/fs/file-max
? Which I think can be set using sysctl.conf