去掉LINUX系统对用户的内存大小和文件句柄限制等限制

本文介绍了如何解除Linux系统对用户内存大小和文件句柄的限制,以增加可创建的进程数量。通过修改/etc/security/limits.conf、/etc/profile和/etc/pam.d/login文件,设置不限制的内存锁和最大进程数。方法包括设置unlimited的memlock限制,以及调整maxuser processes的值,确保在系统重启后生效。
摘要由CSDN通过智能技术生成

去掉内存和文件句柄限制

以coherence用户为例子:


修改:/etc/security/limits.conf

 

coherence hard nproc 655360

coherence soft nproc 655360

 

coherence hard nofile 65536

coherence soft nofile 65536

 

*           hard  memlock           unlimited
*            soft  memlock           unlimited

 

还要修改PROFILE

/etc/profile

ulimit -l unlimited

ulimit -u unlimited

 

还要修改

/etc/pam.d/login

session   required    /lib/security/pam_limits.so

 

需要重启才能生效。

 

执行:ulimit–l 确认

 

. Method 1:Changing Locked Memory Permanently

https://software.intel.com/en-us/blogs/2014/12/16/best-known-methods-for-setting-locked-memory-size

 

This method shows how to alter a configuration limit to allow auser to change the locked memory size.

1.1 Change locked memory size in the host:

Edit the file /etc/security/limits.conf

$ sudo vi /etc/security/limits.conf

Add the following line at the end of the file to set anunlimited locked memory for the user na

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值