相关参数:
/etc/security/limit.conf
user soft nofile 2000000
user hard nofile 2000000
此值和fs.nr_open有关,设置不能超过这个值,否则不能登陆用户,
提示:su: cannot not open session: Permission denied
转:
2.6.25内核之前有个宏定义,定义了这个值的最大值,为1024*1024,正好是100万,而在2.6.25内核及其之后,这个值是可以通过/proc/sys/fs/nr_open来设置
设置fs.file-max = 2000000
fs.file-nr = 2272 0 2000000
fs.file-nr的最大值会取fs.file-max 的值。