I am new to JVM tuning, could anybody help me and explain how to solve a problem of "promotion failed" as following? (Java 1.6 and the JVM options: -XX:+UseConcMarkSweepGC -XX:NewSize=128m -XX:MaxPermSize=256m ):
[GC 96800.304: [ParNew (promotion failed): 287552K->287552K(287552K), 0.8694459 secs]96801.174: [CMS: 5229568K->457193K(5971968K), 19.7176579 secs] 5499429K->457193K(6259520K), [CMS Perm : 66540K->66458K(110904K)], 20.5878599 secs] [Times: user=22.50 sys=0.03, real=20.59 secs]
bevor: 96755.515: [GC 96755.515: [ParNew: 287552K->31936K(287552K), 0.1900583 secs] 5491052K->5243813K(6259520K), 0.1905515 secs] [Times: user=2.21 sys=0.00, real=0.19 secs]
after: 96885.774: [GC 96885.774: [ParNew: 255484K->31936K(287552K), 0.0808239 secs] 712678K->490703K(6259520K), 0.0812894 secs] [Times: user=0.97 sys=0.01, real=0.08 secs]
1. why did the promotion failed when the old generation apears to have enough space (5229568+287552=5517120 < 5971968)? muss "promotion failed" by all means be handelt?
2. [CMS: 5229568K->457193K(5971968K), 19.7176579 secs]: is this full GC and is the time of 19.7176579 really pause (stop the world) time?
3. [CMS Perm : 66540K->66458K(110904K)], 20.5878599 secs]: why ist Permanent space collected too? dit it take a time of 20.5878599-19.7176579=0.870202 ? this action apears to be unnessesary (66540K->66458K), is es possible to disable such aktion?
4. how to solve the problem? I read a post of fixing such problem with XX:SurvivorRatio=4 -XX:CMSInitiatingOccupancyFraction=75, But this did not work for my case.
could this problem be due to the fragmentation of old generation space? could the reduce size of PLAB improving reuse of small chunks like -XX:OldPLABSize=16 help in my case? what ist the default value of OldPLABSize of JAVA 6 ? is there any side-effect for the reduce OldPLABSize?
thanks a lot for any help!
Looks like your old generation has become fragmented and the old space is almost full, or maybe a promoted object is too huge, and there is not enough continue space. Try following:
1> increase the size of old generation.
2> If increase the size of old generation doesnt work , you may try to use G1 algorithm, it may reduce the fragment problem of old generation.