Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > heap size command line, programmatic values, os ps, pmap values

Reply
Thread Tools

heap size command line, programmatic values, os ps, pmap values

 
 
miten
Guest
Posts: n/a
 
      07-16-2010
Hi,

I have provided with outputs and code. If you look at the summary you
can see the numbers but they dont really relate well. I would assume
that -Xms, -Xms should show up in runtime calls, ps ouput as VSS, pmap
output for mapped but they dont really seem to relate.

you know what should be related in these commands regarding memory \
heap ?

Regards,

MMS_


Below is detailed explanation with code/command outputs:


myhost>cat Hello.java
public class Hello {
public static void main(String[] argv) throws Exception {
Runtime r = Runtime.getRuntime();
long t = r.totalMemory();
long f = r.freeMemory();
System.out.println("total-free=" + t + ":" + f + ";" + (t-f));
System.out.println("sleeping 50 sec...");
Thread.sleep(50*1000);//50 sec sleep
System.out.println("ending");
}
}


Re: heap size command line, programmatic values, os ps, pmap values
Jul 16, 2010 5:11 AM (reply 1 of 10) (In reply to original post )

Click to email this message





*default heap setting*
java -classpath . Hello
total-free=439104 //Note: this run was done with println doing just
total-free output.
sleeping 50 sec...


myhost>jps
22017 Jps
21776 Hello

myhost>pmap -d 21776; ps -o rss,vsize,size,pid -p 21776;
21776: java
Start Size Perm Offset Device Mapping
08048000 40K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/bin/java
08052000 4K rwxp 00009000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/bin/java
08053000 132K rwxp 00000000 00:00 [ anon ]
ad9ef000 4K ---p 00000000 00:00 [ anon ]
ad9f0000 512K rwxp 00001000 00:00 [ anon ]
ada70000 12K ---p 00081000 00:00 [ anon ]
ada73000 312K rwxp 00084000 00:00 [ anon ]
adac1000 12K ---p 00000000 00:00 [ anon ]
adac4000 504K rwxp 00003000 00:00 [ anon ]
adb42000 12K ---p 00000000 00:00 [ anon ]
adb45000 504K rwxp 00003000 00:00 [ anon ]
adbc3000 12K ---p 00081000 00:00 [ anon ]
adbc6000 312K rwxp 00084000 00:00 [ anon ]
adc14000 12K ---p 00000000 00:00 [ anon ]
adc17000 312K rwxp 00003000 00:00 [ anon ]
adc65000 12K ---p 00051000 00:00 [ anon ]
adc68000 312K rwxp 00054000 00:00 [ anon ]
adcb6000 4K ---p 00000000 00:00 [ anon ]
adcb7000 716K rwxp 00001000 00:00 [ anon ]
add6a000 1624K r-xs 02fb1000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/rt.jar
adf00000 780K rwxp 0001d000 00:00 [ anon ]
adfc3000 244K ---p 0003e000 00:00 [ anon ]
ae0e3000 4K ---p 00000000 00:00 [ anon ]
ae0e4000 512K rwxp 00001000 00:00 [ anon ]
ae164000 4K ---p 00000000 00:00 [ anon ]
ae165000 512K rwxp 00001000 00:00 [ anon ]
ae1e5000 4K ---p 00000000 00:00 [ anon ]
ae1e6000 512K rwxp 00001000 00:00 [ anon ]
ae266000 4K ---p 00000000 00:00 [ anon ]
ae267000 544K rwxp 00001000 00:00 [ anon ]
ae2ef000 96K rwxp 00008000 00:00 [ anon ]
ae307000 448K rwxp 00000000 00:00 [ anon ]
ae377000 1376K rwxp 00070000 00:00 [ anon ]
ae4cf000 32K rwxp 00000000 00:00 [ anon ]
ae4d7000 96K rwxp 001d0000 00:00 [ anon ]
ae4ef000 448K rwxp 00000000 00:00 [ anon ]
ae55f000 1372K rwxp 00258000 00:00 [ anon ]
ae6b6000 60K rwxp 00000000 00:00 [ anon ]
ae6c5000 168K rwxp 001f6000 00:00 [ anon ]
ae6ef000 16388K rwxp 00000000 00:00 [ anon ]
af6f0000 49152K rwxp 01221000 00:00 [ anon ]
b26f0000 228160K rwxp 00000000 00:00 [ anon ]
c05c0000 703936K rwxp 120f1000 00:00 [ anon ]
eb530000 28480K rwxp 00000000 00:00 [ anon ]
ed100000 88000K rwxp 3ec31000 00:00 [ anon ]
f26f7000 36K rwxp 00000000 00:00 [ anon ]
f2700000 732K rwxp 00009000 00:00 [ anon ]
f27b7000 2304K rwxp 00000000 00:00 [ anon ]
f29f7000 46848K rwxp 00240000 00:00 [ anon ]
f57b7000 60K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libzip.so
f57c6000 8K rwxp 0000e000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libzip.so
f57c8000 32K rwxs 00000000 08:01 /tmp/hsperfdata_mitenm/21776
f57d0000 548K r-xp 00000000 08:01 /lib/libnss_db.so.2.0.0
f5859000 4K rwxp 00089000 08:01 /lib/libnss_db.so.2.0.0
f585a000 72K r-xp 00000000 08:01 /lib/libnsl-2.3.2.so
f586c000 4K rwxp 00011000 08:01 /lib/libnsl-2.3.2.so
f586d000 8K rwxp 00000000 00:00 [ anon ]
f5879000 44K r-xp 00000000 08:01 /lib/libnss_files-2.3.2.so
f5884000 4K rwxp 0000a000 08:01 /lib/libnss_files-2.3.2.so
f5885000 140K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libjava.so
f58a8000 8K rwxp 00023000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libjava.so
f58aa000 44K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libverify.so
f58b5000 4K rwxp 0000b000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libverify.so
f58b6000 12K ---p 00000000 00:00 [ anon ]
f58b9000 312K rwxp 00003000 00:00 [ anon ]
f5907000 132K r-xp 00000000 08:01 /lib/tls/libm-2.3.2.so
f5928000 4K rwxp 00021000 08:01 /lib/tls/libm-2.3.2.so
f593f000 6960K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/server/libjvm.so
f600b000 308K rwxp 006cc000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/server/libjvm.so
f6058000 4240K rwxp 00000000 00:00 [ anon ]
f647c000 1228K r-xp 00000000 08:01 /lib/tls/libc-2.3.2.so
f65af000 12K rwxp 00132000 08:01 /lib/tls/libc-2.3.2.so
f65b2000 12K rwxp 00000000 00:00 [ anon ]
f65b5000 8K r-xp 00000000 08:01 /lib/libdl-2.3.2.so
f65b7000 4K rwxp 00001000 08:01 /lib/libdl-2.3.2.so
f65b8000 28K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/jli/libjli.so
f65bf000 8K rwxp 00006000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/jli/libjli.so
f65c1000 52K r-xp 00000000 08:01 /lib/tls/libpthread-0.60.so
f65ce000 4K rwxp 0000c000 08:01 /lib/tls/libpthread-0.60.so
f65cf000 8K rwxp 00000000 00:00 [ anon ]
f65de000 24K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/native_threads/libh
f65e4000 4K rwxp 00006000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/native_threads/libh
f65e5000 4K rwxp 00001000 00:00 [ anon ]
f65e6000 4K r-xp 00000000 00:00 [ anon ]
f65e7000 4K rwxp 00001000 00:00 [ anon ]
f65e8000 84K r-xp 00000000 08:01 /lib/ld-2.3.2.so
f65fd000 4K rwxp 00015000 08:01 /lib/ld-2.3.2.so
feff8000 32K rwxp ffffa000 00:00 [ stack ]
mapped: 1191088K writeable/private: 1179612K shared: 1656K
RSS VSZ SZ PID
10884 1191088 1179584 21776



*heap=2M*

myhost>java -classpath . -Xms2M -Xmx2M Hello
total-free=1966080:1771352;194728
sleeping 50 sec...
ending



myhost>jps
8261 Jps
8073 Hello

myhost>pmap -d 8073; ps -o rss,vsize,size,pid -p 8073
8073: java
Start Size Perm Offset Device Mapping
08048000 40K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/bin/java
08052000 4K rwxp 00009000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/bin/java
08053000 916K rwxp 00000000 00:00 [ anon ]
ed984000 4K ---p 00000000 00:00 [ anon ]
ed985000 512K rwxp 00001000 00:00 [ anon ]
eda05000 12K ---p 00081000 00:00 [ anon ]
eda08000 312K rwxp 00084000 00:00 [ anon ]
eda56000 12K ---p 00000000 00:00 [ anon ]
eda59000 504K rwxp 00003000 00:00 [ anon ]
edad7000 12K ---p 00000000 00:00 [ anon ]
edada000 504K rwxp 00003000 00:00 [ anon ]
edb58000 12K ---p 00081000 00:00 [ anon ]
edb5b000 312K rwxp 00084000 00:00 [ anon ]
edba9000 12K ---p 00001000 00:00 [ anon ]
edbac000 312K rwxp 00004000 00:00 [ anon ]
edbfa000 12K ---p 00052000 00:00 [ anon ]
edbfd000 312K rwxp 00055000 00:00 [ anon ]
edc4b000 4K ---p 00000000 00:00 [ anon ]
edc4c000 716K rwxp 00001000 00:00 [ anon ]
edcff000 1624K r-xs 02fb1000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/rt.jar
ede95000 4K ---p 00000000 00:00 [ anon ]
ede96000 512K rwxp 00001000 00:00 [ anon ]
edf16000 4K ---p 00000000 00:00 [ anon ]
edf17000 512K rwxp 00001000 00:00 [ anon ]
edf97000 4K ---p 00000000 00:00 [ anon ]
edf98000 512K rwxp 00001000 00:00 [ anon ]
ee018000 4K ---p 00000000 00:00 [ anon ]
ee019000 544K rwxp 00001000 00:00 [ anon ]
ee0a1000 96K rwxp 00008000 00:00 [ anon ]
ee0b9000 4K rwxp 00000000 00:00 [ anon ]
ee0ba000 8K rwxp 00001000 00:00 [ anon ]
ee0bc000 32K rwxp 00000000 00:00 [ anon ]
ee0c4000 96K rwxp 0000b000 00:00 [ anon ]
ee0dc000 4K rwxp 00000000 00:00 [ anon ]
ee0dd000 4K rwxp 00024000 00:00 [ anon ]
ee0de000 16392K rwxp 00000000 00:00 [ anon ]
ef0e0000 49152K rwxp 01024000 00:00 [ anon ]
f20e0000 1024K rwxp 00000000 00:00 [ anon ]
f21e0000 4096K rwxp 04124000 00:00 [ anon ]
f25e0000 1024K rwxp 00000000 00:00 [ anon ]
f26e6000 36K rwxp 00000000 00:00 [ anon ]
f26ef000 732K rwxp 00009000 00:00 [ anon ]
f27a6000 2304K rwxp 00000000 00:00 [ anon ]
f29e6000 46848K rwxp 00240000 00:00 [ anon ]
f57a6000 32K rwxs 00000000 08:01 /tmp/hsperfdata_mitenm/8073
f57ae000 548K r-xp 00000000 08:01 /lib/libnss_db.so.2.0.0
f5837000 4K rwxp 00089000 08:01 /lib/libnss_db.so.2.0.0
f5838000 44K r-xp 00000000 08:01 /lib/libnss_files-2.3.2.so
f5843000 4K rwxp 0000a000 08:01 /lib/libnss_files-2.3.2.so
f5849000 60K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libzip.so
f5858000 8K rwxp 0000e000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libzip.so
f585a000 72K r-xp 00000000 08:01 /lib/libnsl-2.3.2.so
f586c000 4K rwxp 00011000 08:01 /lib/libnsl-2.3.2.so
f586d000 8K rwxp 00000000 00:00 [ anon ]
f587c000 24K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/native_threads/libh
f5882000 4K rwxp 00006000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/native_threads/libh
f5883000 4K rwxp 00001000 00:00 [ anon ]
f5884000 4K r-xp 00000000 00:00 [ anon ]
f5885000 140K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libjava.so
f58a8000 8K rwxp 00023000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libjava.so
f58aa000 44K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libverify.so
f58b5000 4K rwxp 0000b000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libverify.so
f58b6000 12K ---p 00000000 00:00 [ anon ]
f58b9000 312K rwxp 00003000 00:00 [ anon ]
f5907000 132K r-xp 00000000 08:01 /lib/tls/libm-2.3.2.so
f5928000 4K rwxp 00021000 08:01 /lib/tls/libm-2.3.2.so
f593f000 6960K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/server/libjvm.so
f600b000 308K rwxp 006cc000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/server/libjvm.so
f6058000 4240K rwxp 00000000 00:00 [ anon ]
f647c000 1228K r-xp 00000000 08:01 /lib/tls/libc-2.3.2.so
f65af000 12K rwxp 00132000 08:01 /lib/tls/libc-2.3.2.so
f65b2000 12K rwxp 00000000 00:00 [ anon ]
f65b5000 8K r-xp 00000000 08:01 /lib/libdl-2.3.2.so
f65b7000 4K rwxp 00001000 08:01 /lib/libdl-2.3.2.so
f65b8000 28K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/jli/libjli.so
f65bf000 8K rwxp 00006000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/jli/libjli.so
f65c1000 52K r-xp 00000000 08:01 /lib/tls/libpthread-0.60.so
f65ce000 4K rwxp 0000c000 08:01 /lib/tls/libpthread-0.60.so
f65cf000 8K rwxp 00000000 00:00 [ anon ]
f65e7000 4K rwxp 00001000 00:00 [ anon ]
f65e8000 84K r-xp 00000000 08:01 /lib/ld-2.3.2.so
f65fd000 4K rwxp 00015000 08:01 /lib/ld-2.3.2.so
feff6000 40K rwxp ffff8000 00:00 [ stack ]
mapped: 144576K writeable/private: 133344K shared: 1656K
RSS VSZ SZ PID
9948 144576 133072 8073


*heap = 5M*
myhost>java -classpath . -Xms5M -Xmx5M Hello
total-free=5111808:4917080;194728
sleeping 50 sec...


myhost>pmap -d 30384; ps -o rss,vsize,size,pid -p 30384
30384: java
Start Size Perm Offset Device Mapping
08048000 40K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/bin/java
08052000 4K rwxp 00009000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/bin/java
08053000 916K rwxp 00000000 00:00 [ anon ]
ed984000 4K ---p 00000000 00:00 [ anon ]
ed985000 512K rwxp 00001000 00:00 [ anon ]
eda05000 12K ---p 00081000 00:00 [ anon ]
eda08000 312K rwxp 00084000 00:00 [ anon ]
eda56000 12K ---p 00000000 00:00 [ anon ]
eda59000 504K rwxp 00003000 00:00 [ anon ]
edad7000 12K ---p 00000000 00:00 [ anon ]
edada000 504K rwxp 00003000 00:00 [ anon ]
edb58000 12K ---p 00081000 00:00 [ anon ]
edb5b000 312K rwxp 00084000 00:00 [ anon ]
edba9000 12K ---p 00000000 00:00 [ anon ]
edbac000 312K rwxp 00003000 00:00 [ anon ]
edbfa000 12K ---p 00051000 00:00 [ anon ]
edbfd000 312K rwxp 00054000 00:00 [ anon ]
edc4b000 4K ---p 00000000 00:00 [ anon ]
edc4c000 716K rwxp 00001000 00:00 [ anon ]
edcff000 1624K r-xs 02fb1000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/rt.jar
ede95000 4K ---p 00000000 00:00 [ anon ]
ede96000 512K rwxp 00001000 00:00 [ anon ]
edf16000 4K ---p 00000000 00:00 [ anon ]
edf17000 512K rwxp 00001000 00:00 [ anon ]
edf97000 4K ---p 00000000 00:00 [ anon ]
edf98000 512K rwxp 00001000 00:00 [ anon ]
ee018000 4K ---p 00000000 00:00 [ anon ]
ee019000 544K rwxp 00001000 00:00 [ anon ]
ee0a1000 96K rwxp 00008000 00:00 [ anon ]
ee0b9000 8K rwxp 00000000 00:00 [ anon ]
ee0bb000 4K rwxp 00002000 00:00 [ anon ]
ee0bc000 32K rwxp 00000000 00:00 [ anon ]
ee0c4000 96K rwxp 0000b000 00:00 [ anon ]
ee0dc000 16400K rwxp 00000000 00:00 [ anon ]
ef0e0000 49152K rwxp 01024000 00:00 [ anon ]
f20e0000 4096K rwxp 00000000 00:00 [ anon ]
f24e0000 1024K rwxp 04424000 00:00 [ anon ]
f25e0000 1024K rwxp 00000000 00:00 [ anon ]
f26e6000 36K rwxp 00000000 00:00 [ anon ]
f26ef000 732K rwxp 00009000 00:00 [ anon ]
f27a6000 2304K rwxp 00000000 00:00 [ anon ]
f29e6000 46848K rwxp 00240000 00:00 [ anon ]
f57a6000 32K rwxs 00000000 08:01 /tmp/hsperfdata_mitenm/30384
f57ae000 548K r-xp 00000000 08:01 /lib/libnss_db.so.2.0.0
f5837000 4K rwxp 00089000 08:01 /lib/libnss_db.so.2.0.0
f5838000 44K r-xp 00000000 08:01 /lib/libnss_files-2.3.2.so
f5843000 4K rwxp 0000a000 08:01 /lib/libnss_files-2.3.2.so
f5849000 60K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libzip.so
f5858000 8K rwxp 0000e000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libzip.so
f585a000 72K r-xp 00000000 08:01 /lib/libnsl-2.3.2.so
f586c000 4K rwxp 00011000 08:01 /lib/libnsl-2.3.2.so
f586d000 8K rwxp 00000000 00:00 [ anon ]
f587c000 24K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/native_threads/libh
f5882000 4K rwxp 00006000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/native_threads/libh
f5883000 4K rwxp 00001000 00:00 [ anon ]
f5884000 4K r-xp 00000000 00:00 [ anon ]
f5885000 140K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libjava.so
f58a8000 8K rwxp 00023000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libjava.so
f58aa000 44K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libverify.so
f58b5000 4K rwxp 0000b000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libverify.so
f58b6000 12K ---p 00000000 00:00 [ anon ]
f58b9000 312K rwxp 00003000 00:00 [ anon ]
f5907000 132K r-xp 00000000 08:01 /lib/tls/libm-2.3.2.so
f5928000 4K rwxp 00021000 08:01 /lib/tls/libm-2.3.2.so
f593f000 6960K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/server/libjvm.so
f600b000 308K rwxp 006cc000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/server/libjvm.so
f6058000 4240K rwxp 00000000 00:00 [ anon ]
f647c000 1228K r-xp 00000000 08:01 /lib/tls/libc-2.3.2.so
f65af000 12K rwxp 00132000 08:01 /lib/tls/libc-2.3.2.so
f65b2000 12K rwxp 00000000 00:00 [ anon ]
f65b5000 8K r-xp 00000000 08:01 /lib/libdl-2.3.2.so
f65b7000 4K rwxp 00001000 08:01 /lib/libdl-2.3.2.so
f65b8000 28K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/jli/libjli.so
f65bf000 8K rwxp 00006000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/jli/libjli.so
f65c1000 52K r-xp 00000000 08:01 /lib/tls/libpthread-0.60.so
f65ce000 4K rwxp 0000c000 08:01 /lib/tls/libpthread-0.60.so
f65cf000 8K rwxp 00000000 00:00 [ anon ]
f65e7000 4K rwxp 00001000 00:00 [ anon ]
f65e8000 84K r-xp 00000000 08:01 /lib/ld-2.3.2.so
f65fd000 4K rwxp 00015000 08:01 /lib/ld-2.3.2.so
feff7000 36K rwxp ffff9000 00:00 [ stack ]
mapped: 144572K writeable/private: 133340K shared: 1656K
RSS VSZ SZ PID
9956 144572 133068 30384



*heap=2G*
myhost>java -classpath . -Xms2048M -Xmx2048M Hello
total-free=2117664768:2114086488;3578280
sleeping 50 sec...
ending

myhost>jps
25932 Hello
26251 Jps

myhost>pmap -d 25932; ps -o rss,vsize,size,pid -p 25932
25932: java
Start Size Perm Offset Device Mapping
08048000 40K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/bin/java
08052000 4K rwxp 00009000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/bin/java
08053000 940K rwxp 00000000 00:00 [ anon ]
6d6cd000 4K ---p 00000000 00:00 [ anon ]
6d6ce000 512K rwxp 00001000 00:00 [ anon ]
6d74e000 12K ---p 00000000 00:00 [ anon ]
6d751000 312K rwxp 00003000 00:00 [ anon ]
6d79f000 12K ---p 00000000 00:00 [ anon ]
6d7a2000 504K rwxp 00003000 00:00 [ anon ]
6d820000 12K ---p 00000000 00:00 [ anon ]
6d823000 312K rwxp 00003000 00:00 [ anon ]
6d87f000 12K ---p 00000000 00:00 [ anon ]
6d882000 636K rwxp 00003000 00:00 [ anon ]
6d921000 892K ---p 000b0000 00:00 [ anon ]
6da20000 12K ---p 00000000 00:00 [ anon ]
6da23000 312K rwxp 00003000 00:00 [ anon ]
6da71000 12K ---p 00000000 00:00 [ anon ]
6da74000 312K rwxp 00003000 00:00 [ anon ]
6dac2000 4K ---p 00000000 00:00 [ anon ]
6dac3000 716K rwxp 00001000 00:00 [ anon ]
6db76000 1624K r-xs 02fb1000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/rt.jar
6dd0c000 4K ---p 00000000 00:00 [ anon ]
6dd0d000 512K rwxp 00001000 00:00 [ anon ]
6dd8d000 4K ---p 00000000 00:00 [ anon ]
6dd8e000 512K rwxp 00001000 00:00 [ anon ]
6de0e000 4K ---p 00000000 00:00 [ anon ]
6de0f000 512K rwxp 00001000 00:00 [ anon ]
6de8f000 4K ---p 00000000 00:00 [ anon ]
6de90000 544K rwxp 00001000 00:00 [ anon ]
6df18000 96K rwxp 00008000 00:00 [ anon ]
6df30000 3676K rwxp 00000000 00:00 [ anon ]
6e2c7000 96K rwxp 00397000 00:00 [ anon ]
6e2df000 20484K rwxp 00000000 00:00 [ anon ]
6f6e0000 49152K rwxp 01421000 00:00 [ anon ]
726e0000 2097152K rwxp 00000000 00:00 [ anon ]
f26e6000 36K rwxp 00000000 00:00 [ anon ]
f26ef000 732K rwxp 00009000 00:00 [ anon ]
f27a6000 2304K rwxp 00000000 00:00 [ anon ]
f29e6000 46848K rwxp 00240000 00:00 [ anon ]
f57a6000 32K rwxs 00000000 08:01 /tmp/hsperfdata_mitenm/25932
f57ae000 548K r-xp 00000000 08:01 /lib/libnss_db.so.2.0.0
f5837000 4K rwxp 00089000 08:01 /lib/libnss_db.so.2.0.0
f5838000 44K r-xp 00000000 08:01 /lib/libnss_files-2.3.2.so
f5843000 4K rwxp 0000a000 08:01 /lib/libnss_files-2.3.2.so
f5849000 60K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libzip.so
f5858000 8K rwxp 0000e000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libzip.so
f585a000 72K r-xp 00000000 08:01 /lib/libnsl-2.3.2.so
f586c000 4K rwxp 00011000 08:01 /lib/libnsl-2.3.2.so
f586d000 8K rwxp 00000000 00:00 [ anon ]
f587c000 24K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/native_threads/libh
f5882000 4K rwxp 00006000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/native_threads/libh
f5883000 4K rwxp 00001000 00:00 [ anon ]
f5884000 4K r-xp 00000000 00:00 [ anon ]
f5885000 140K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libjava.so
f58a8000 8K rwxp 00023000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libjava.so
f58aa000 44K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libverify.so
f58b5000 4K rwxp 0000b000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/libverify.so
f58b6000 12K ---p 00000000 00:00 [ anon ]
f58b9000 312K rwxp 00003000 00:00 [ anon ]
f5907000 132K r-xp 00000000 08:01 /lib/tls/libm-2.3.2.so
f5928000 4K rwxp 00021000 08:01 /lib/tls/libm-2.3.2.so
f593f000 6960K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/server/libjvm.so
f600b000 308K rwxp 006cc000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/server/libjvm.so
f6058000 4240K rwxp 00000000 00:00 [ anon ]
f647c000 1228K r-xp 00000000 08:01 /lib/tls/libc-2.3.2.so
f65af000 12K rwxp 00132000 08:01 /lib/tls/libc-2.3.2.so
f65b2000 12K rwxp 00000000 00:00 [ anon ]
f65b5000 8K r-xp 00000000 08:01 /lib/libdl-2.3.2.so
f65b7000 4K rwxp 00001000 08:01 /lib/libdl-2.3.2.so
f65b8000 28K r-xp 00000000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/jli/libjli.so
f65bf000 8K rwxp 00006000 00:09 /ms/dist/msjava/PROJ/sunjdk/
1.6.0_14/.exec/@sys/jre/lib/i386/jli/libjli.so
f65c1000 52K r-xp 00000000 08:01 /lib/tls/libpthread-0.60.so
f65ce000 4K rwxp 0000c000 08:01 /lib/tls/libpthread-0.60.so
f65cf000 8K rwxp 00000000 00:00 [ anon ]
f65e7000 4K rwxp 00001000 00:00 [ anon ]
f65e8000 84K r-xp 00000000 08:01 /lib/ld-2.3.2.so
f65fd000 4K rwxp 00015000 08:01 /lib/ld-2.3.2.so
feff6000 40K rwxp ffff8000 00:00 [ stack ]
mapped: 2244348K writeable/private: 2232224K shared: 1656K
RSS VSZ SZ PID
17684 2244348 2232844 25932

Regards.
 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      07-16-2010
On Jul 16, 11:03*am, miten <(E-Mail Removed)> wrote:
> Hi,
>
> I have provided with outputs and code. If you look at the summary you
> can see the numbers but they dont really relate well. I would assume
> that -Xms, -Xms should show up in runtime calls, ps ouput as VSS, pmap
> output for mapped but they dont really seem to relate.
>
> you know what should be related in these commands regarding memory \
> heap ?
>


Of course they don't relate. -Xms and -Xmx are internal to the JVM
and do not dictate in any way to the JVM how to fulfill the requests
for internally-managed heap.

Remember also that the JVM has more to remember than just heap, so of
course there will be internal JVM memory not affected by -Xms and -
Xmx, for example, stack memory, permanent-generation memory, Hotspot
memory, and so on.

--
Lew
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How much heap can I reserve for JVM? Error when allocation very much heap Raymond Schanks Java 0 04-11-2010 04:25 PM
stl heap question: restoring heap validinty after changing 1 element viki C++ 6 06-28-2008 10:12 AM
Heap dump file size vs heap size Michal Slocinski Java 1 03-25-2008 12:54 PM
Can we determine stack size & Heap size at runtime ? sunny C Programming 5 08-17-2006 12:17 AM
Size of Heap at some location in program Bruce Barker ASP .Net 2 11-23-2005 08:36 AM



Advertisments