Linux system and user thread number process limit query

#Check the maximum number of threads supported by the system, which is generally very large, equivalent to the theoretical value
Donald_Draper@Server:~> cat /proc/sys/kernel/pid_max
32768

#Maximum memory allowed by the process
Donald_Draper@Server:~> cat /proc/sys/vm/max_map_count
2000000

#The system limits how many processes or threads can run under a user at most
Donald_Draper@Server:~> 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) 62907
max locked memory       (kbytes, -l) 64
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) 62907
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
Donald_Draper@Server:~>  

#View the maximum number of threads allowed by the process
Donald_Draper@Server:~> pstree -p 11089 | wc -l
282
Donald_Draper@Server:~>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326358137&siteId=291194637