CentOS 6.x
Kernel version 2.6.32 above, modify/etc/security/limits.d/90-nproc.conf: Because the system is read first/etc/security/limits.conf value, in the/etc/security/ Limits.d/90-nproc.conf to cover, so, just changing/etc/security/limits.conf is no effect
CentOS 5.x
CentOS 5.x does not 90-nproc.conf this file, my side is modified by/etc/security/limits.conf, at last add
* Soft Nproc N
* Hard Nproc N
If there is no limit, the maximum value is determined by the physical memory size:/proc/meminfo (KB) divided by (KB), the principle is from: http://blog.yufeng.info/archives/2568
$ cat/proc/meminfo |grep memtotal
memtotal:49421024 KB
$ echo "49421024/128" | Bc
386101
$ ulimit-u
385962
Note: BC Command line Calculator
If the process may have unlimited bar fork and the process has started, the above values are not valid, and the following is a dynamic adjustment method:
Echo-n ' Max processes=soft_limits:hard_limits ' >/proc/' pidof mysqld '/limits
The processes limit of the existing mysqld can be dynamically adjusted by the above command.
"Original" Modify maximum user process limit "ulimit-u"