简单的说, max-file表示系统级别的能够打开的文件句柄的数量, 而ulimit -n控制进程级别能够打开的文件句柄的数量.
man 5 proc, 找到file-max的解释:
file-max中指定了系统范围内所有进程可打开的文件句柄的数量限制(系统级别, kernel-level). (The value in file-max denotes the maximum number of file handles that the Linux kernel will allocate).当收到”Too many open files in system”这样的错误消息时, 就应该曾加这个值了.
# cat /proc/sys/fs/file-max 4096 # echo 100000 > /proc/sys/fs/file-...

