This blog post attempts to show the steps involved {with an example} in increasing the maximum processes allowed per user id on Solaris.
Steps- Examine the current limit.
% ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files (-n) 256
pipe size (512 bytes, -p) 10
stack size (kbytes, -s) 8480
cpu time (seconds, -t) unlimited
max user processes (-u) 9989
virtual memory (kbytes, -v) unlimited
# echo maxuprc/D | adb -k
physmem 5f75e
maxuprc:
maxuprc: 9989
# sysdef | grep v_maxup
9989 maximum processes per user id (v.v_maxup)
On Solaris:
max_nprocs = (10 + 16 * maxusers)
maxuprc = (max_nprocs - 5)
Where:
max_nprocs = Total number of system wide processes
maxuprc = Total number of processes a non-root user can have occupying a process table slot at any point in time
maxusers is a tunable parameter at the kernel level that is by default set to the lesser of the amount of memory in Mbytes or 2048. Range: 1 to 2048, based on physical memory if not set in the /etc/system file; and 1 to 4096, if set in the /etc/system file.
Proceeding with the same example:
# echo maxusers/D | adb -k
physmem 5f75e
maxusers:
maxusers: 624
Therefore, maxuprc = (10 + (16 * 624) - 5) = 9989.
- If rebooting the system is not an option, dynamically increase the maximum user processes limit as shown in the example. The following example increases the limit to 20,000.
# adb -kw
physmem 5f75e
maxuprc/D <-- type this line
maxuprc:
maxuprc: 9989
v+0x1c/W0x4e20 <-- type this line. 0x4e20 is the hexa-decimal equivalent of 20,000
v+0x1c: 0x2705 = 0x4e20
$q <-- type this to quit adb
Check the maximum user processes limit one more time.
% ulimit -a | grep processes
max user processes (-u) 20000
% sysdef | grep v_maxup
20000 maximum processes per user id (v.v_maxup)
Note:
Even though the maxuprc
gets updated in the system, abd
still shows the old value that it picked up during the system boot up process.
- If the system can be rebooted or if you want the new
maxuprc
value to be presistent across multiple reboots, add the following line to /etc/system.
set maxuprc = <DesiredNumber>
Alternatively increase
maxusers
from the current value by setting
set maxusers = <DesiredMbytes>
in /etc/system. Then the maximum number of processes on the system will be derived from the
maxusers
.
Check
Process-Sizing Parameters section of Solaris Tunable Parameters Reference Manual for more.
Reference:
Sunsolve Document 202586: How is the maximum size of the process table determined?
Solaris kernel tunables________________
Technorati Tags:
Solaris |
OpenSolaris