Linux内核参数调优

(单个进程)查看最大文件句柄数

 

调参

vi /etc/security/limits.conf





# End of file
root soft nofile 1000000
root hard nofile 1000000
* soft nofile 1000000
* hard nofile 1000000

注意

  • 修改后,需要重启

修改全局文件句柄限制

查看全局文件句柄限制
cat /proc/sys/fs/file-max


永久修改全局文件句柄
vi /etc/sysctl.conf

在最底部添加
fs.file-max=1000000

立刻让配置文件生效
sysctl -p

posted @ 2022-01-20 20:39  陈彦斌  阅读(68)  评论(0编辑  收藏  举报