There's been a lot of threads today. The problem of running out of virtual memory
The PID of my application is 2558 to see the status at this time:
[Email protected]:/proc/2558# cat Status
Name:sonia
State:s (sleeping)
tgid:2558
pid:2558
ppid:2335
tracerpid:0
uid:0 0 0 0
gid:0 0 0 0
fdsize:256
groups:0
vmpeak:2812816 KB
vmsize:2799304 KB
vmlck:0 KB
vmpin:0 KB
vmhwm:799404 KB
vmrss:790564 KB physical Memory use, here is 4G physical memory, is no problem
vmdata:2721456 KB can see that at this time has consumed 2.7G of virtual memory, and is still growing, a process total 4G virtual space, Application layer 3G, the kernel state 1G, this 3G is running out
vmstk:912 KB
vmexe:19196 KB
vmlib:7012 KB
vmpte:3336 KB
vmswap:0 KB
threads:371you can see that there are 371 threads open and growing
sigq:0/29838
sigpnd:0000000000000000
shdpnd:0000000000000000
sigblk:0000000000000000
sigign:0000000000001000
Sigcgt:00000001800006a9
capinh:0000000000000000
Capprm:0000001fffffffff
Capeff:0000001fffffffff
Capbnd:0000001fffffffff
seccomp:0
Cpus_allowed:f
Cpus_allowed_list:0-3
Mems_allowed:1
mems_allowed_list:0
voluntary_ctxt_switches:2881
nonvoluntary_ctxt_switches:23528
There are other parameters that are also interesting, such as: Vmrss: The physical memory usage of the process
Status when hanging off:
[Email protected]:/proc/2452# cat Status
Name:sonia
State:s (sleeping)
tgid:2452
pid:2452
ppid:2334
tracerpid:0
uid:0 0 0 0
gid:0 0 0 0
fdsize:256
groups:0
vmpeak:3092408 KB
vmsize:3092400 KB
vmlck:0 KB
vmpin:0 KB
vmhwm:783332 KB
vmrss:779388 KB
vmdata:3014552 KB
vmstk:912 KB
vmexe:19196 KB
vmlib:7012 KB
vmpte:3904 KB
vmswap:0 KB
threads:519
sigq:0/29838
sigpnd:0000000000000000
shdpnd:0000000000000000
sigblk:0000000000000000
sigign:0000000000001000
Sigcgt:00000001800006a9
capinh:0000000000000000
Capprm:0000001fffffffff
Capeff:0000001fffffffff
Capbnd:0000001fffffffff
seccomp:0
Cpus_allowed:f
Cpus_allowed_list:0-3
Mems_allowed:1
mems_allowed_list:0
voluntary_ctxt_switches:2779
nonvoluntary_ctxt_switches:29252
[Email protected]:/proc/2452#
/proc/pid/status View the status of a process--too many threads encountered a virtual memory exhaustion issue