GC Parameters for low-latency (Ralf Helbing)

Alexey Ragozin alexey.ragozin at gmail.com
Wed Nov 16 19:24:19 UTC 2011


Hi Ralf,

>
> we try to achieve low latencies despite using a huge heap (10G) and many
> logical cores (64).
> VM is 1.7u1. Ideally, we would let GC ergonomics decide what is best,
> giving only a low pause time goal (50ms).
>
> -Xss2m
> -Xmx10000M
> -XX:PermSize=256m
> -XX:+UseAdaptiveGCBoundary
> -XX:+UseAdaptiveSizePolicy
> -XX:+UseConcMarkSweepGC
> -XX:MaxGCPauseMillis=100
> -XX:ParallelGCThreads=12
>
> -XX:+BindGCTaskThreadsToCPUs
> -XX:+UseGCTaskAffinity
>
> -XX:+UseCompressedOops
> -XX:+DoEscapeAnalysis
>
> Whenever we use adaptive sizes, the VM will crash in GenCollect*, as
> soon as some serious allocations start. I already filed a bug for this
> (7112413).
>
> Assuming a small newsize helps maintaining a low pause time goal, I can
> set the newsize, too. Say I set it to 100MB, it will increase later
> anyway, again yielding frequent pause times in over 1s by the time the
> newsize is around 1G.
>
> What am I doing wrong here?
>

Your assumption about correlation of new size and  pause time may be very
wrong. My experiments (but on x86 architecture,not spark) has shown that
young collection pause time on large heap mostly dominated by time required
to scan dirty card table, thus proportional to old space size.You may find
detailed math here
http://aragozin.blogspot.com/2011/06/understanding-gc-pauses-in-jvm-hotspots.htmland
some expiremental proof here
http://aragozin.blogspot.com/2011/07/openjdk-patch-cutting-down-gc-pause.html

As for recipe for low pause GC, I have outlined may here
http://aragozin.blogspot.com/2011/07/gc-check-list-for-data-grid-nodes.html.
But I have to say that again,all my expirience is relevant for x86, I will
not be surprised too much if things work differently on sparc.

PS
sorry for posting so much links, but they are really helpful to catch up on
topic of low pause GC tuning

Regards,
Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20111116/9d8ddab4/attachment.htm>


More information about the hotspot-gc-dev mailing list