My test for G1,the result seems disappointed

Peter Schuller peter.schuller at infidyne.com
Fri Sep 10 12:32:25 PDT 2010


>     when use G1 and set MaxGCPauseMillis=100,
> GCPauseIntervalMillis=60000,full gc occurs about 2 every minute and

This is unreasonable. You're telling G1 to do at most 100 ms worth of
work per minute. In other words you're asking it to collect all data
generated in a full minute, in 100 ms. Unless you have reason to do
otherwise, I'd suggest scaling down MaxGCPauseMillis and
GCPauseIntervalMillis with similar factors. So for example, one
example to start with might be 100/150.

> parallel gc occurs about 1 every minute,application stopped about
> 2850ms every minute,the avg response time slows down to 170ms.

Sounds like fallback to full GC. Adjust GC pause requirements to
something reasonable as above to hopefully avoid it.

>     when use G1 and only set MaxGCPauseMillis=50,then no full gc,but
> parallel gc executes about 45 every minute(about 40ms per parallel
> gc),the avg response time slows down to 118ms.

It is fully expected that g1 performs GC:s often, assuming the
application does a reasonable amount of allocation. The GC pause time
mnemonics are used, in part, to determine how much to GC at once. In
general, lower pause time requirements mean shorter but more frequent
pauses.

-- 
/ Peter Schuller


More information about the hotspot-gc-dev mailing list