What are the default values of nproc in RHEL5 and RHEL6 and why are they different?
Environment
- Red Hat Enterprise Linux 6
Issue
- Why are the default values of nproc in RHEL6 different from RHEL4 and RHEL5?
- Where are the default soft limits of open process threads set in RHEL6?
Resolution
- In Red Hat Enterprise Linux 4 and 5, the default value of nproc is half of kernel.threads-max
# sysctl -a | grep threads-max
kernel.threads-max = 33024
# ulimit -u
16512
- While in Red Hat Enterprise Linux 6, the default value is not based on kernel.threads-max
# sysctl -a | grep threads-max
kernel.threads-max = 47819
# ulimit -u
1024
- Instead, the value is set to 1024 in /etc/security/limits.d/90-nproc.conf
* soft nproc 1024
Root Cause
- Default limit for number of user's processes is used to prevent accidental fork bombs
- For more information: This content is not included.This content is not included.https://bugzilla.redhat.com/show_bug.cgi?id=432903
SBR
Product(s)
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.