linux limit限制规则

9 篇文章 0 订阅

查看

ulimit -a

/etc/profile
~/.bash_profile
/etc/security/limit.conf
/etc/security/limit.d/20-nproc.conf

优先级(网上说法):

1./etc/security/limit.d/20-nproc.conf
2./etc/security/limit.conf
3.~/.bash_profile
4./etc/profile

优先级(我个人理解)(bash_profile里的类似每次切换用户临时生效,所以高于永久生效):

1.~/.bash_profile
2./etc/profile
3./etc/security/limit.d/20-nproc.conf
4./etc/security/limit.conf

1.常规

编辑/etc/security/limits.conf 添加如下内容:
vi /etc/security/limits.conf

grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

2.99 20文件(优先级高于上面的limits.conf)

Linux6:
/etc/security/limits.d/90-nproc.conf

Linux7:
/etc/security/limits.d/20-nproc.conf

3.oracle-database-preinstall-19c.conf文件

一般19c有,位置也在 /etc/security/limits.d/下,用sqlplus startup起会用这个的限制

# oracle-database-preinstall-19c setting for nofile soft limit is 1024
oracle soft nofile 1024

# oracle-database-preinstall-19c setting for nofile hard limit is 65536
oracle hard nofile 65536

# oracle-database-preinstall-19c setting for nproc soft limit is 16384
# refer orabug15971421 for more info.
oracle soft nproc 16384

# oracle-database-preinstall-19c setting for nproc hard limit is 16384
oracle hard nproc 16384

# oracle-database-preinstall-19c setting for stack soft limit is 10240KB
oracle soft stack 10240

# oracle-database-preinstall-19c setting for stack hard limit is 32768KB
oracle hard stack 32768

# oracle-database-preinstall-19c setting for memlock hard limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90 % of RAM
oracle hard memlock 474620572

# oracle-database-preinstall-19c setting for memlock soft limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90% of RAM
oracle soft memlock 474620572

# oracle-database-preinstall-19c setting for data soft limit is ‘unlimited’
oracle soft data unlimited

# oracle-database-preinstall-19c setting for data hard limit is ‘unlimited’
oracle hard data unlimited

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

汪灵骅

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值