Why total memory in JVM different from mx set in command line ?

David Tavoularis david.tavoularis at mycom-int.com
Fri Dec 19 05:48:32 PST 2008


Hi all,

According to GC logs in Java6u7 (with ParallelGC) : Young (4141888K) + Old (9601024K) + Perm (65536K) = 13808448K = 13484M

But I have set in my application "-Xms15000m -Xmx15000m", so why is it using only 13484M and not 15000MB ?

Here is the command line :
/jdk1.6.0_07/bin/sparcv9/java -Djava.rmi.dgc.leaseValue=900000 -Dsun.rmi.dgc.checkInterval=2000 -Xms15000m -Xmx15000m -Dsun.rmi.dgc.ackTimeout=600000 -Dsun.rmi.transport.tcp.handshakeTimeout=480000 -Dsun.rmi.dgc.client.gcInterval=900000 -Dsun.rmi.dgc.server.gcInterval=900000 -XX:PermSize=64m -XX:+UseParallelGC -XX:+AggressiveHeap -XX:MaxPermSize=64m -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -Xloggc:/logs/gc_20081218225025.log [...]

Is it due to "-XX:+AggressiveHeap" option ? I thought that setting explicitely "-Xms15000m -Xmx15000m" would have priority over all other settings ?


I am asking this question, because about 80% of the time is spent in Full GC, because Old is full (and cannot decrease its used memory after Full GC) and Young has still about 4GB available memory (cf logs at the end of the mail), and the JVM is not using all the allocated memory (15000MB) I have set.

Thanks in advance

-- 
David


bash-2.05$ /jdk1.6.0_07/bin/sparcv9/java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)

52466.148: [Full GC [PSYoungGen: 452608K->0K(3842048K)] [PSOldGen: 8795119K->6475385K(9601024K)] 9247727K->6475385K(13443072K) [PSPermGen: 27475K->27475K(65536K)], 99.2609731 secs] [Times: user=86.76 sys=11.47, real=99.26 secs]
52797.271: [Full GC [PSYoungGen: 524288K->0K(3842048K)] [PSOldGen: 9070698K->5703387K(9601024K)] 9594986K->5703387K(13443072K) [PSPermGen: 27481K->27435K(65536K)], 87.8324542 secs] [Times: user=77.69 sys=9.46, real=87.83 secs]
52970.658: [Full GC [PSYoungGen: 499712K->0K(4141888K)] [PSOldGen: 8686617K->9165136K(9601024K)] 9186329K->9165136K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 121.8882243 secs] [Times: user=112.81 sys=8.52, real=121.89 secs]
53120.266: [Full GC [PSYoungGen: 2595456K->300802K(4141888K)] [PSOldGen: 9165136K->9600868K(9601024K)] 11760592K->9901670K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 139.5463433 secs] [Times: user=121.81 sys=17.26, real=139.55 secs]
53286.881: [Full GC [PSYoungGen: 2595178K->937364K(4141888K)] [PSOldGen: 9600868K->9601015K(9601024K)] 12196047K->10538379K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 147.6696010 secs] [Times: user=127.59 sys=17.58, real=147.67 secs]
53454.005: [Full GC [PSYoungGen: 2595456K->0K(4141888K)] [PSOldGen: 9601015K->9265737K(9601024K)] 12196471K->9265737K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 142.7581380 secs] [Times: user=122.33 sys=19.76, real=142.76 secs]
53624.011: [Full GC [PSYoungGen: 2595325K->547071K(4141888K)] [PSOldGen: 9265737K->9601016K(9601024K)] 11861062K->10148088K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 142.1983137 secs] [Times: user=123.50 sys=18.48, real=142.20 secs]
53789.263: [Full GC [PSYoungGen: 2595456K->286503K(4141888K)] [PSOldGen: 9601016K->9600973K(9601024K)] 12196472K->9887477K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 139.7337031 secs] [Times: user=120.66 sys=17.86, real=139.73 secs]
53955.139: [Full GC [PSYoungGen: 2595456K->781183K(4141888K)] [PSOldGen: 9600973K->9600951K(9601024K)] 12196429K->10382135K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 144.6186694 secs] [Times: user=126.05 sys=17.15, real=144.62 secs]
54119.925: [Full GC [PSYoungGen: 2595426K->0K(4141888K)] [PSOldGen: 9600951K->9376129K(9601024K)] 12196377K->9376129K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 142.2981970 secs] [Times: user=122.97 sys=19.13, real=142.30 secs]
54288.972: [Full GC [PSYoungGen: 2595350K->62462K(4141888K)] [PSOldGen: 9376129K->9600996K(9601024K)] 11971480K->9663458K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 140.0093989 secs] [Times: user=119.49 sys=18.48, real=140.01 secs]
54459.472: [Full GC [PSYoungGen: 2595456K->421274K(4141888K)] [PSOldGen: 9600996K->9600942K(9601024K)] 12196452K->10022217K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 137.9107134 secs] [Times: user=120.89 sys=16.65, real=137.91 secs]
54617.578: [Full GC [PSYoungGen: 2595456K->1357975K(4141888K)] [PSOldGen: 9600942K->9600916K(9601024K)] 12196398K->10958892K(13742912K) [PSPermGen: 27435K->27435K(65536K)], 147.3664763 secs] [Times: user=130.74 sys=16.54, real=147.37 secs]
54780.295: [Full GC [PSYoungGen: 2592918K->0K(4141888K)] [PSOldGen: 9600916K->9336888K(9601024K)] 12193834K->9336888K(13742912K) [PSPermGen: 27436K->27423K(65536K)], 142.8640284 secs] [Times: user=123.12 sys=19.48, real=142.86 secs]
54947.117: [Full GC [PSYoungGen: 2595456K->0K(4141888K)] [PSOldGen: 9336888K->9462199K(9601024K)] 11932344K->9462199K(13742912K) [PSPermGen: 27426K->27426K(65536K)], 133.3983335 secs] [Times: user=115.64 sys=16.19, real=133.40 secs]
55109.155: [Full GC [PSYoungGen: 2595456K->114051K(4141888K)] [PSOldGen: 9462199K->9600968K(9601024K)] 12057655K->9715019K(13742912K) [PSPermGen: 27429K->27429K(65536K)], 134.7067961 secs] [Times: user=118.36 sys=16.12, real=134.71 secs]
55268.204: [Full GC [PSYoungGen: 2594017K->90416K(4141888K)] [PSOldGen: 9600968K->9601024K(9601024K)] 12194985K->9691440K(13742912K) [PSPermGen: 27433K->27433K(65536K)], 134.8825079 secs] [Times: user=117.80 sys=16.77, real=134.88 secs]
55430.100: [Full GC [PSYoungGen: 2595456K->0K(4141888K)] [PSOldGen: 9601024K->9312929K(9601024K)] 12196480K->9312929K(13742912K) [PSPermGen: 27436K->27423K(65536K)], 144.5261398 secs] [Times: user=124.62 sys=18.85, real=144.53 secs]
55605.960: [Full GC [PSYoungGen: 2595456K->0K(4141888K)] [PSOldGen: 9312929K->9464892K(9601024K)] 11908385K->9464892K(13742912K) [PSPermGen: 27426K->27426K(65536K)], 140.3140088 secs] [Times: user=122.42 sys=17.06, real=140.32 secs]

bash-2.05$ vmstat 1
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr s0 sd sd sd   in   sy   cs us sy id
 1 2 0 24963192 15153960 720 1970 3713 402 402 0 1 0 0 0 0 30112 92067 46009 24 8 67
 0 0 0 22088272 6687416 0 301 16 0 0  0  0  0  0  0  0 1556 6725 1484 13  0 86
 0 1 0 22088272 6687336 42 0 24 0  0  0  0  0  0  0  0 1032 5746 1269 12  0 87
[about 6.5GB RAM free on the server]




More information about the hotspot-gc-use mailing list