Surprise with ShenandoahGuaranteedGCInterval
Aleksey Shipilev
shade at redhat.com
Tue Jan 21 18:17:06 UTC 2020
On 1/21/20 6:11 PM, Holger Hoffstätte wrote:
> Setting it to 0 turned out to not do what I expected, which was to turn
> off the periodic timer; instead it seems to take the option at face value
> and runs continously. -1 didn't work either; I ended up using 1h, which
> unfortunately keeps the timer running, waking up the process every second
> or so.
Yeah, we should have the special value to disable it:
https://bugs.openjdk.java.net/browse/JDK-8237586
> IMHO it would be nice to be able to turn the timer off. I understand why
> it's there and why it's super useful for normal operation; it's just that
> in this very particular case I don't need it, and it shows in my overnight
> idle CPU usage, which goes from 0.05% to 0.10%.
There is no separate timer for "periodic GC". Control thread does all of this, and it sleeps here:
https://hg.openjdk.java.net/shenandoah/jdk8/hotspot/file/353510f8073a/src/share/vm/gc_implementation/shenandoah/shenandoahControlThread.cpp#l301
...so if you want to experiment with longer idles, ShenandoahControlInterval* should be bumped up.
Note that changing ShenandoahControlIntervalMin might have detrimental effects on GC response when
heap suddenly changes. As in, with very long control interval you would run into allocation failure
before GC is able to react.
--
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list