I have a web application running in glassfish in RHEL. For the application, these are set:
Heap Memory:4GB
Perm Gen:1GB
JConsole shows:
heap memory - 500mb
non heap memory - 350mb
threads =378
Top shows:
PID User PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17948 root 20 0 12.8g 1.9g 22m S 1.5 16.0 14:09.11 java
From starting itself process is consuming 12.8G.
Top also shows:
Mem: 12251392k total, 11915584k used, 335808k free, 47104k buffers
Swap: 8322944k total, 6747456k used, 1575488k free, 177088k cached
The problem is swap space is continuosly increasing. When no swap space is left, the web application stops respondng.
- Killing process does not reduces used swap space but only after computer reboot. Why?
- Why is the process consuming 12.8 GB of virtual space when started?
- How to approach to resolve this issue?
Update:
The jconsole output(recorded for 24 hours) shows that heap memory and non heap memory didn't increase much. Even though the swap space redcued by 1.5Gb in the same period: Jconsole output