You should probably use Parallel collection and use -XX:-UseAdaptiveSizePolicy. Docs are for Java 1.5 but I can't find anything more recent.
The implementation of -XX:+UseAdaptiveSizePolicy used by default with
the -XX:+UseParallelGC garbage collector has changed to consider three
goals:
- a desired maximum GC pause goal
- a desired application throughput goal
- minimum footprint
The implementation checks (in this order):
- If the GC pause time is greater than the pause time goal then reduce the generations sizes to better attain the goal.
- If the pause time goal is being met then consider the application's throughput goal. If the application's throughput goal
is not being met, then increase the sizes of the generations to
better attain the goal.
- If both the pause time goal and the throughput goal are being met, then the size of the generations are decreased to reduce footprint.
EDIT
Added "-" per OP's suggestion.