Adjust the number of processes opened by Linux users and the number of linux Processes
How to adjust the number of processes opened by Linux Users
References:
About nproc limits for ulimit in RHEL6 (http://www.cnblogs.com/kumulinux/archive/2012/12/16/2820609.html)
!! The content of this article is only tested on RHEL6.4. This article only applies to all users
1. view the nproc (max user processes) command
[root@vm-cdh4 ~]# ulimit -u14866
2. Modify nproc
Temporary modification. expired upon logon or restart:
[root@vm-cdh4 ~]# ulimit -u 32768[root@vm-cdh4 ~]# ulimit -u
32768
Try/Etc/security/limits. confAdd the following Configuration:
* soft nproc 32768
Log out of the current user, log on again or restart, and check that the configuration is still invalid.
Continue to try/Etc/security/limits. d/90-nproc.confAdd Configuration:
* soft nproc 65536
Log out of the current user, log on again or restart, and check that the configuration is still invalid.
Continue to try/Etc/security/limits. d/90-nproc.confAdd Configuration:
* soft nproc 65536* hard nproc 65536
After logging on again or restarting, check that the configuration has taken effect. We can see that hard nproc works.
3 conclusion
Temporary modification (no restriction in shell. xxx can be any number, which indicates that this modification is meaningless ):
# ulimit -u xxx
Permanent modification. The insurance policy is modified at the same time.
/Etc/security/limits. d/90-nproc.confAnd
/Etc/security/limits. confAs follows:
Limits_conf =/etc/security/limits. conf:
* soft nproc s1* hard nproc h1
Nproc_conf =/etc/security/limits. d/90-nproc.conf:
* soft nproc s2* hard nproc h2
S1, h1, s2, h2 must be a meaningful number. At this time, the value displayed by ulimit-u is = min (h1, h2)
Therefore, we usually set s1 = s2 = h1 = h2. For exampleLimits_confAndNproc_confAdd:
* soft nproc 16384* hard nproc 16384