Am 28.02.2017 um 12:04 schrieb Petr Gladkikh:
I believe modern Linux systems have much higher than 1024 file descriptor per process limits. E.g. on my system
$ uname -srv
Linux 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017
$ cat /proc/sys/fs/file-max
2013532
And you can adjust this limit to your requirements.



Sorry to jump in here out of my closet, but i think this fact needs some clarification. My research came up with the following:

/proc/sys/fs/file-max is not the "per" process limit , rather then the overall limit of the system
This can also be controlled by writing into  /proc/sys/fs/file-max.

to get to know the hardlimit per process you use
ulimit -Hn
soft limit is showed via
ulimit -Sn

as the ulimit manpage states, the hard limit acts as a ceiling for the softlimit , which can be controlled.


So we have the per-proccess limitations, but as soon as we fork() and recieve a new pid, we can have yet another set of fds , right ?

cheers rob

Reply via email to