G1 collector, incremental PermGen collection possible?

Wolfgang Pedot wolfgang.pedot at finkzeit.at
Tue Oct 15 08:55:01 PDT 2013


Hello,

we are running a web-based java application-server (heap 15000MB, 
young-gen 5500MB, old-gen usage ~6GB). Since its interactive we have had 
some issues with full-GCs in the past (takes ~15sec) and worked around 
that by using CMS with class-unloading enabled. That works reasonably 
well but it also has the occasional promotion-failure triggering an STW 
full-GC. After running the (smaller) test-system on java7 and GC1 for a 
while I have switched the live-system to java7/GC1 yesterday and the 
young/old-gens look fine so far. The young-collector takes a little more 
time than before but it also keeps the old-gen in check by doing 
mixed-collects so we have not had a "normal" old-collect all day (more 
than 20 per day before).

We have had 1226 young-collects so far taking a total of 291sec, there 
have been 2 full-GCs taking 15sec each which I call "abnormal" because I 
have to get rid of them. One has been triggered by "out of to-space" and 
the second one by a full PermGen.

The problem is PermGen, part of the application creates a lot of dynamic 
classes and so PermGen gets full at some point which will trigger a 
full-GC blocking the system for ~15sec once or twice a day. With CMS and 
class unloading enabled that work was distributed throughout the day but 
I guess since the young-collector also takes care of some old-gen stuff 
in G1 it never looks at PermGen until its to late.

Is there any way to get G1 to collect PermGen without falling back to a 
15sec full-GC?

Here are the relevant parameters I used for java7u40, I based the 
command-line on the one we used for java6/CMS:

-Xmx15000M -Xms15000M -Xmn5500M -Xss228k -Xloggc:gclog.txt 
-XX:ParallelGCThreads=12 -XX:+PrintTenuringDistribution -XX:+PrintGC 
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps 
-XX:LargePageSizeInBytes=2m  -XX:+UseLargePages -XX:SurvivorRatio=8 
-XX:ReservedCodeCacheSize=128m -XX:+UseG1GC  -XX:MaxGCPauseMillis=150 
-XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31

Quite a long mail, I hope I included all the relevant parts...

kind regards
Wolfgang


More information about the hotspot-gc-use mailing list