Upper limit of file descriptor in Linux

后端 未结 2 824
一生所求
一生所求 2021-02-05 19:38

what is the upper limit of file-descriptor that can be used in any Linux system (specifically ubuntu 10.04)?

I am using Ubuntu 10.04 (64-bit) and my CPU architecture fo

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-05 20:10

    Each file descriptor takes up some kernel memory, so at some point you'll exhaust it. That being said, up to a hundred thousand file descriptors are not unheard of for server deployments where event-based (epoll on Linux) server architectures are used. So 400k is not completely unreasonable.

    For the second questions, see /proc/PID/fd/ or /proc/PID/fdinfo directories.

提交回复
热议问题