Description: Too many Major GCs. Unable to set desired Eden and Survirors spaces based on NewSize and Survivor ratio. GC is reporting values of Eden and survivor spaces different from what we get using SUN documents and articles.
Technical Issue: Hi,
I have some question related to GC and would appreciate a quick response from you. Our current heap settings are as follows
MEM_ARGS="-Xms1536m -Xmx1536m -XX:NewSize=540m -XX:MaxNewSize=540m -XX:SurvivorRatio=8 -XXermSize=128m -XX:MaxPermSize=128m -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+PrintGCTaskTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC - XX:+PrintTenuringDistribution -Xloggc:logs/gc.dat"
According to SUN documentation and the articles, for the above settings each survivor space should be 1/10-th of the size of New, i.e., 54 MB. The Eden space should be 8/10-th of the size of New, i.e., 432MB. Thus, according to our calculation Eden = 432MB, 2 Survivors = 108 MB. However, GC is showing that Eden is 539 MB and each survivor is 0.5 MB. Why?* How can we calculate the Eden and Survivor spaces from survivor ratio and the size of the New. Note that our new size is 540MB and the survivor ratio is 8.
A snap shot of the GC output is given below
6737.491: [GC {Heap before GC invocations=28:
Heap
par new generation total 552448K, used 551936K [0x91000000,
0xb2c00000, 0xb2c00000)
eden space 551936K, 100% used [0x91000000, 0xb2b00000, 0xb2b00000)
from space 512K, 0% used [0xb2b00000, 0xb2b00000, 0xb2b80000)
to space 512K, 0% used [0xb2b80000, 0xb2b80000, 0xb2c00000)
concurrent mark-sweep generation total 1019904K, used 465185K
[0xb2c00000, 0xf1000000, 0xf1000000)
concurrent-mark-sweep perm gen total 131072K, used 65482K
[0xf1000000,> 0xf9000000, 0xf9000000)
6737.491: [ParNew: 551936K->551936K(552448K), 0.0000741
secs]6737.492:> [CMS: 465185K->435548K(1019904K), 5.8957217 secs]
1017121K->435548K(1572352K) Heap after GC invocations=29:
Heap
par new generation total 552448K, used 0K [0x91000000,
0xb2c00000,> 0xb2c00000)
eden space 551936K, 0% used [0x91000000, 0x91000000, 0xb2b00000)
from space 512K, 0% used [0xb2b00000, 0xb2b00000, 0xb2b80000)
to space 512K, 0% used [0xb2b80000, 0xb2b80000, 0xb2c00000)
concurrent mark-sweep generation total 1019904K, used 435548K
[0xb2c00000, 0xf1000000, 0xf1000000)
concurrent-mark-sweep perm gen total 131072K, used 62072K
[0xf1000000,> 0xf9000000, 0xf9000000)
} , 5.8964473 secs]
ANY HELP WOULD BE GREATLY APPRECIATED. HOW CAN WE CALCULATE EDEN AND SURVIVOR SPACES BASED ON NEWSIZE AND SURVIVIVOR RATIO.
WHY GC IS CALCULATING THEM DIFFERENTLY THAN SUN DOCS SUGGEST. I would appreciate if you kindly explain my mistake. This is urgently needed. Thanks for your help.
Regards,
Ashish.
Technical Issue: Hi,
I have some question related to GC and would appreciate a quick response from you. Our current heap settings are as follows
MEM_ARGS="-Xms1536m -Xmx1536m -XX:NewSize=540m -XX:MaxNewSize=540m -XX:SurvivorRatio=8 -XXermSize=128m -XX:MaxPermSize=128m -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+PrintGCTaskTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC - XX:+PrintTenuringDistribution -Xloggc:logs/gc.dat"
According to SUN documentation and the articles, for the above settings each survivor space should be 1/10-th of the size of New, i.e., 54 MB. The Eden space should be 8/10-th of the size of New, i.e., 432MB. Thus, according to our calculation Eden = 432MB, 2 Survivors = 108 MB. However, GC is showing that Eden is 539 MB and each survivor is 0.5 MB. Why?* How can we calculate the Eden and Survivor spaces from survivor ratio and the size of the New. Note that our new size is 540MB and the survivor ratio is 8.
A snap shot of the GC output is given below
6737.491: [GC {Heap before GC invocations=28:
Heap
par new generation total 552448K, used 551936K [0x91000000,
0xb2c00000, 0xb2c00000)
eden space 551936K, 100% used [0x91000000, 0xb2b00000, 0xb2b00000)
from space 512K, 0% used [0xb2b00000, 0xb2b00000, 0xb2b80000)
to space 512K, 0% used [0xb2b80000, 0xb2b80000, 0xb2c00000)
concurrent mark-sweep generation total 1019904K, used 465185K
[0xb2c00000, 0xf1000000, 0xf1000000)
concurrent-mark-sweep perm gen total 131072K, used 65482K
[0xf1000000,> 0xf9000000, 0xf9000000)
6737.491: [ParNew: 551936K->551936K(552448K), 0.0000741
secs]6737.492:> [CMS: 465185K->435548K(1019904K), 5.8957217 secs]
1017121K->435548K(1572352K) Heap after GC invocations=29:
Heap
par new generation total 552448K, used 0K [0x91000000,
0xb2c00000,> 0xb2c00000)
eden space 551936K, 0% used [0x91000000, 0x91000000, 0xb2b00000)
from space 512K, 0% used [0xb2b00000, 0xb2b00000, 0xb2b80000)
to space 512K, 0% used [0xb2b80000, 0xb2b80000, 0xb2c00000)
concurrent mark-sweep generation total 1019904K, used 435548K
[0xb2c00000, 0xf1000000, 0xf1000000)
concurrent-mark-sweep perm gen total 131072K, used 62072K
[0xf1000000,> 0xf9000000, 0xf9000000)
} , 5.8964473 secs]
ANY HELP WOULD BE GREATLY APPRECIATED. HOW CAN WE CALCULATE EDEN AND SURVIVOR SPACES BASED ON NEWSIZE AND SURVIVIVOR RATIO.
WHY GC IS CALCULATING THEM DIFFERENTLY THAN SUN DOCS SUGGEST. I would appreciate if you kindly explain my mistake. This is urgently needed. Thanks for your help.
Regards,
Ashish.