JDK-6952079 : With UseParallelScavenge use MinHeapFreeRation/MaxHeapFreeRatio if UseAdaptiveSivePolicy is off.
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2010-05-13
  • Updated: 2016-12-15
  • Resolved: 2016-03-07
Related Reports
Relates :  
Description
Currently when UseAdaptiveSizePolicy is off for UseParallelGC the generations do not
change from their initial sizes.  This change makes UseParallelGC generations grow and
shrink using MinHeapFreeRation/MaxHeapFreeRatio in a way similar to the other
collectors.  Additionally, based on a new flag on a System.gc() the
MinHeapFreeRation/MaxHeapFreeRatio sizing is used when UseAdaptiveSizePolicy is
on.

Comments
If we want to replace SerialGC with ParallelGC using 1 thread, we'll need to do something here. Making ParallelGC use the heap-free-ratios makes sense except for the compatibility issue (i.e., -UseAdaptiveSizePolicy has a behavior for ParallelGC). One possibility would be yet another flag to say use the heap-free-ratios with ParallelGC if UseAdaptiveSizePolicy is turned off. In jdk9 we could issue a warning that -UseAdaptiveSizePolicy is going to change behavior for ParallelGC in a future release and then in jdk10 make -UseAdaptiveSizePolicy cause ParallelGC to use the heap-free-ratios.
02-10-2014

Talked to Jesper about this, and we do not think it is worthwhile doing: - parallel gc never grew/shrink if -XX:-UseAdaptiveSizePolicy has been set. It would be strange if it started now to be "a little" adaptive - people actively turning off adaptive sizing probably have a clear idea why they do it, so doing it anyway might not be useful to them Thoughts?
29-09-2014