G1 Performance [Was: JEP 248: Make G1 the Default Garbage Collector]

Kirk Pepperdine kirk.pepperdine at gmail.com
Thu Jul 30 09:20:42 UTC 2015


Hi Andrew,

> 
>> You have to give G1 more memory than what you’d use with the
>> parallel collector. Less memory will lower your throughput.
> 
> Perhaps, but this machine has 64G and java is setting a default heap
> size of 16G.  Nothing I've been testing has needed anything like a 16G
> heap.

Indeed, in this case is might also be how internal buffers are size (according to total heap size). But if you don’t have buffer overflows or other like conditions occurring, you won’t see any benefit of using a larger heap.

> 
>> If you haven’t already, you may want to troll back through the
>> hotspot mailing list to review the interactions that have already
>> taken place on this subject.
> 
> If the G1 collector needs more memory, then it is surely a requirement
> that java should set the default heap size appropriately.  But I don't
> at the moment believe that memory usage is the real problem because as
> far as I can tell changing the heap size doesn't seem to help.
> 
> I'd be happy if I could find a heap size which would allow me to get
> closer to the performance of the parallel collector.  What should I
> try?  1.5 times as big?  More?

Quite honestly, I’ve no idea. It depends on where the time is going. another thing is that being more aggressive at which regions to collect will reduce floating garbage and that will have a win…. but of course the win comes at more work evacuating more regions. I’ve not been able to sort out a good balance.

My experiences with performance have been mixed. I can’t seem to sort out why.

Regards,
Kirk



More information about the hotspot-dev mailing list