G1GC, Java8u40ea, Metaspace questions

Wolfgang Pedot wolfgang.pedot at finkzeit.at
Fri Feb 13 20:19:49 UTC 2015


Not at all, unfortunately I have not kept many logs so far because I was 
playing with lots of different configurations.

I also have some new Information:

I ran a test with 500M MetaspaceSize and a max of 600M (Test-setup needs 
~100MB after Full-GC) and the first 3 collects in Metaspace where 
beautifully handled by G1 but every collect afterwards was a Full-GC.
The log of that test was lost because I terminated it to start my 
current test, which is basically the same but without a maximum. My test 
represents a worst-case scenario in that it generates lots of 
short-lived classes and objects, heap occupation stays well below the 
configured threshold. Here is what happened so far:

The first concurrent cycle was requested right as commited Metaspace hit 
500M exactly

  Metaspace       used 430049K, capacity 511992K, committed 512000K, 
reserved 1435648K

Afterwards:
  Metaspace       used 174458K, capacity 196210K, committed 352588K, 
reserved 1275904K

As you can see "used" is higher than I expected but I guess its possible 
that a FullGC can clean up more than a concurrent cycle while my test is 
still running.

Now on to the second cycle:
  Metaspace       used 491388K, capacity 587512K, committed 587648K, 
reserved 1490944K
  Metaspace       used 172063K, capacity 193180K, committed 387200K, 
reserved 1290240K

third:
  Metaspace       used 538141K, capacity 645280K, committed 645336K, 
reserved 1531904K
  Metaspace       used 170096K, capacity 190548K, committed 410148K, 
reserved 1296384K

fourth:
  Metaspace       used 569051K, capacity 683142K, committed 683580K, 
reserved 1558528K
  Metaspace       used 168038K, capacity 187908K, committed 421768K, 
reserved 1296384K

Skipping ahead to number seven:

  Metaspace       used 639341K, capacity 770728K, committed 770820K, 
reserved 1622016K
  Metaspace       used 165744K, capacity 185838K, committed 476240K, 
reserved 1327104K

Right after that collect my loop was done, generating about 500000 
classes without a single FullGC.
What is alarming though is that the high-water mark appears to be rising 
because even though usage after the collects is more or less stable the 
collects happen later and later.
If I try to limit this by setting a maximum I begin to see FullGCs....

I restarted my test-loop (same JVM still) and this is cycle eight:

  Metaspace       used 657814K, capacity 793582K, committed 793736K, 
reserved 1638400K
  Metaspace       used 163159K, capacity 182612K, committed 478472K, 
reserved 1323008K


I will send you the full log, its slightly to big for the list.

Wolfgang



More information about the hotspot-gc-use mailing list