I noticed YourKit is tracking GC Pauses in the performance timeline. I'm curious what the effect of these pauses are on the different types of snapshots (tracing, sampling CPU time, sampling wall time)?
I would hope it's not influencing the captures for tracing and sampling CPU time but perhaps it is for sample wall time? Or is an GC pause excluded from wall time so that's accurate as well?
GC Pause Effects?
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: GC Pause Effects?
GC pauses happen when the garbage collector decides they should happen. The profiler shows pause count and duration information as reported by the JVM.
GC pause time is not used for measured time correction.
GC pause time is not used for measured time correction.
-
- Posts: 2
- Joined: Tue Sep 24, 2019 5:43 pm
Re: GC Pause Effects?
So to clarify the question if a thread is in method myMethod() that usually takes 25ms and there's a 2 second GC pause during the snapshot collection time YourKit will report a hotspot and 2025ms time in ALL tracing modes?
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: GC Pause Effects?
If the GC pause is stop-the-world and therefore stops the thread, then yes.
However, modern collectors (e.g. G1) designed to be "almost pauseless" will make GC pauses much shorter, and these 2 seconds from your example are likely impossible unless you have opted to use a throughput-oriented garbage collector instead where longer pauses are possible (and acceptable) but overall GC overhead is lower.
However, modern collectors (e.g. G1) designed to be "almost pauseless" will make GC pauses much shorter, and these 2 seconds from your example are likely impossible unless you have opted to use a throughput-oriented garbage collector instead where longer pauses are possible (and acceptable) but overall GC overhead is lower.