How to adjust the number of processes opened by Linux Users

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.