Resource問題

修改系統的max open files、max user processes (ulimit的使用方法) 目錄

/etc/pcp.env: fork: retry: 資源暫時無法取得 /bin/sh: fork: retry: 資源暫時無法取得

cat /proc/sys/kernel/pid_max
32768
root@omvNAS1:/etc/default# sysctl kernel.pid_max
kernel.pid_max = 32768

系統使用遠遠超過

ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 128356
max locked memory       (kbytes, -l) 65536
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 128356
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
root@omvNAS1:/etc/default# ulimit -u
128356

x86_64的最大限制為4194303,x86的最大限制為32767

nano /etc/sysctl.conf

.......................
kernel.pid_max = 4194303

sysctl -p

sysctl -p
dev.raid.speed_limit_min = 50000
dev.raid.speed_limit_max = 500000
kernel.pid_max = 4194303

修改max user processes

ulimit -u 300000

Last updated