线程可以打开的最大文件数修改

Linux 运维以及脚本干货: 欢迎分享,欢迎folk, 欢迎留言
https://unnunique.github.io/AADocs/skill-docs/linux/
https://github.com/unnunique/unnunique.github.io/blob/master/AADocs/skill-docs/linux/index.md

线程可以打开的最大文件数修改

如下:

在/etc/security/limits.conf 中添加两行。

#<domain>      <type>  <item>         <value>
#
#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4
* soft nofile 65535
* hard nofile 65535  (添加的两行)
# End of file
* soft nofile 65535 <br/>
* hard nofile 65535 <br/>

执行以下两个命令,

ulimit -Hn 65535

ulimit -Sn 65535

之后重启系统,reboot

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值