pmap confuse java applicaiton memeory used

在SUSE中,當用pmap 查看 java 進程時,會看到很多信息

> pmap 32088
32088: java
START               SIZE     RSS     PSS   DIRTY    SWAP PERM MAPPING
0000000040000000     36K     36K      1K      0K      0K r-xp /usr/java/jdk1.6.0_31/bin/java
0000000040108000      8K      8K      8K      8K      0K rwxp /usr/java/jdk1.6.0_31/bin/java
000000004010a000   2492K   2448K   2448K   2448K      0K rwxp [heap]
0000000683600000  23104K  11276K  11276K  11276K      0K rwxp [anon]
0000000684c90000   1728K      0K      0K      0K      0K ---p [anon]

..............................................

00007fff26dd6000      4K      4K      0K      0K      0K r-xp [vdso]
ffffffffff600000      4K      0K      0K      0K      0K r-xp [vsyscall]
Total:           6594996K  82020K  73089K  72296K      0K

6382660K writable-private, 209860K readonly-private, 2476K shared, and 82016K referenced

writeable/private” 是包括虛擬內存,公共lib等的進程消耗,對於Java進程 無參考意義,the RSS(物理內存)是要關注的。

注意:該值不只是heap

The memory usage for the java process is more that just the Java heap. It consists of (hope it didn't forget anything):

the Java heap (where allocated objects go)the permgen (where static class data goes)the thread stacks (where method-local references, basic data values, and other information used to maintain method calling go)various other C/C++ data structures used by the JVM to do its jobthe binary code for the JVM and the libraries that it uses to do it jobthe binary, compiled code for the Java methods
這些命令也是非常有用的:
jstat -gc PID
top -p PID
ps -uf -p PID
jstack PID
發佈了27 篇原創文章 · 獲贊 5 · 訪問量 11萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章