On Wed, Jan 12, 2022 at 1:54 PM Steve Roth <st...@rothskeller.net> wrote: > > I am attempting to profile my code, and I'm unable to interpret the results. > So first, the meta-question is, what's the best forum to use to request help > with such things?
This is a good place. See also https://golang.org/wiki/Questions. > The chain that is taking 70% of the time is > > gcBgMarkWorker > > systemstack > > gcBgMarkWorker.func2 > > gcDrain > > markroot > > markroot.func1 > > suspendG This is the concurrent garbage collector. > The chain that is taking 17% of the time is > > mcall > > park_m > > schedule > > findrunnable > > stopm > > mPark > > notesleep > > futexsleep > > futex > > Again I have no clue what this is doing. Any guidance is welcome, including > pointers to other forums better suited for such questions. This is the goroutine scheduler. If your program is CPU bound (as it should be based on your description) then 70% in the garbage collector is a lot. The next step is to collect a heap profile to see where the memory is being allocated. You may want to look at https://go.dev/blog/pprof, old but still valid. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXnq769msjGTJ_qWNX3vSNRZT%3DebW%3DK8PfndTtaFzid0w%40mail.gmail.com.