How to adjust the number of processes opened by Linux Users
Adjust the number of processes opened by Linux users !! The content of this article is only tested on RHEL6.4. This article is only for all users.
1. view the nproc (max user processes) command
[Root @ vm-cdh4 ~] # Ulimit-u
14866
2. Modify nproc
Temporary modification. expired upon logon or restart:
[Root @ vm-cdh4 ~] # Ulimit-u 32768
Try to add the following configuration in/etc/security/limits. conf:
* Soft nproc 32768
Log out of the current user, log on again or restart, and check that the configuration is still invalid.
Continue to add the configuration in/etc/security/limits. d/90-nproc.conf:
* Soft nproc 65536
Log out of the current user, log on again or restart, and check that the configuration is still invalid.
Continue to add the configuration in/etc/security/limits. d/90-nproc.conf:
* 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 to modify/etc/security/limits. d/90-nproc.conf and/etc/security/limits. conf at the same time as 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, s1 = s2 = h1 = h2 is usually set. For example, add the following parameters to both limits_conf and nproc_conf:
* Soft nproc 16384
* Hard nproc 16384
This article permanently updates the link address: