Meaning of GC (Dedicated) and GC (Idle) in tracing profile visualizer?

406 views
Skip to first unread message

ken.kof...@gmail.com

unread,
Jun 26, 2017, 6:24:13 PM6/26/17
to golang-nuts
Hi Gophers,
I was using the go tool trace to analyze my program and I noticed two events named GC (Idle) and GC (Dedicated), does anyone know the distinction between the two? I cannot find any info about them online. If I were to make an educated guess I suppose that GC (Idle) would be the portion of GC that runs concurrently with the program and GC dedicated is the portion of GC that stops the world, but I wanted to be sure of this.
Thanks,
Ken

Ian Lance Taylor

unread,
Jun 26, 2017, 6:56:33 PM6/26/17
to ken.kof...@gmail.com, golang-nuts
GC (idle) is goroutines doing GC marking because there is no other
work for the program to do.

GC (dedicated) is goroutines dedicated to doing nothing other than GC
marking, for at least the current GC cycle. The number of goroutines
put into this mode depends on how hard the GC has to work to keep up
with memory being allocated by the rest of the program.

Ian
Reply all
Reply to author
Forward
0 new messages