I did some research on JVM heap size scaling. You can read more here and here .
The main conclusion: the young GC-pause has two components of constant and variable.
The constant component depends on the size of the old space and for 64GiB, I expect it to be 80 ms-120 ms (depending on the hardware).
The variable component depends on the survival of objects in a young space (thus, it changes from collection to collection). This is really application-specific, but you can usually reduce it by reducing the young space (due to more frequent pauses).
In your case, for 4 GiB of youthful space, you have 500 ms. Assuming a variable component of 400 ms, if you reduce the young space to 1 GB, you should have ~ 200 ms pauses (but 2 times per second).
Another approach is to use more processor cores, the young GC parallel is very good .
Alexey Ragozin
source share