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 job
  • the binary code for the JVM and the libraries that it uses to do it job
  • the binary, compiled code for the Java methods
    这些命令也是非常有用的:
    jstat -gc PID
    top -p PID
    ps -uf -p PID
    jstack PID
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值