Garbage Collection - timings and suspension

Rohit Mohta rmohta.coder at gmail.com
Tue Jul 26 13:37:10 UTC 2016


Hi Thomas,

    What could be the other reasons for stopping all application threads?
Like JIT? Any reference I can read through and understand more?

And thank you for PrintSafePointStatistics.

Cheers,
Rohit

On Tuesday, July 26, 2016, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:

> Hi Rohit,
>
>   just some addition to Jenny's response:
>
> On Mon, 2016-07-25 at 15:17 +0000, Rohit Mohta wrote:
> > Hi All,
> >
> >    Can someone please help me understand the below snippet of Garbage
> > Collection logs?
> >
> [...]
> >
> > (b)    I can see “Stopping threads took: 0.0001230 seconds” statement
> > in numerous occasions. Even when, GC was not taking place.
>
> There are many other causes of the VM stopping all threads than garbage
> collection, for many different purposes.
>
> > ·        What does it mean by ‘stopping threads took’? Does it mean,
> > garbage collector process was trying to ‘park’ all the threads,
> > without interrupting ongoing instructions. So it had to wait for
> > ongoing processing to complete, before it could put the thread in
> > ‘park’ state?
>
> This message means what you describe, i.e. this is the time from
> signalling the threads in the VM to stop until all of them are stopped.
>
> > ·        Why does JVM stop application threads even when we don’t see
> > any Full GC events? In my system, full gc event is fired every 60
> > mins – but I can see the above statement numerous times. Why does
> > that happen?
>
> The VM needs to do other kind of accounting next to garbage collection
> that requires a stop-the-world pause.
>
> > ·        When we talk about GC Suspension time, our definition is –
> > “time for which application will not process anything. Application
> > kinda hangs”. Should we consider these “Total time for which
> > application threads were stopped” also as Suspension time?
>
> Yes.
>
> > ·        Any best practices to reduce the suspension time (apart from
> > GC friendly code)?
>
> This depends on the reason for the suspension that should be printed if
> PrintSafepointStatistics is turned on. One potential knob to turn is
> GuaranteedSafepointInterval. Note that it is not advised to make this
> overly long or turn it off completely (default is 1s).
>
> Thanks,
>   Thomas
>
> _______________________________________________
> hotspot-gc-use mailing list
> hotspot-gc-use at openjdk.java.net <javascript:;>
> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20160726/4ba509f3/attachment.html>


More information about the hotspot-gc-use mailing list