参考链接:
Linux下设置最大文件打开数nofile及nr_open、file-max
process information pseudo-filesystem
1. 关键内核参数
man proc查看一下参数定义
/proc/sys/fs/file-max
This file defines a system-wide limit on the number of open files for all processes.(See also setrlimit(2), which can be used by a process to set the per-process limit, RLIMIT_NOFILE, on the number of files it may open.)
系统中所有进程可以打开的最大的文件数
/proc/sys/fs/nr_open
This file imposes ceiling on the value to which the RLIMIT_NOFILE resource limit can be raised (see getrlimit(2)). This ceiling is enforced for both unprivileged and privileged process. The default value in this file is 1048576. (Before Linux 2.6.25, the ceiling for RLIMIT_NOFILE was har