Indeed. If you allocate data faster than the GC mark phase can find and mark it, it enlists the "mutator" (I.e., your program) to assist it in the GC. Roughly, allocations are now followed by some marking work, so the allocation rate doesn't outpace the marking rate.
The solution is to lower your allocation rate in your program, or make the data you have easier to mark by avoiding pointers where a flat storage is more applicable. Also, `sync.Pool` comes to mind as a tool which might be useful, once you've profiled and found the problematic spots. On Tue, Jun 11, 2019 at 10:32 AM ding liu <liuding...@gmail.com> wrote: > Thanks, this is. I find some infomation at > https://docs.google.com/document/d/1wmjrocXIWTr1JxU-3EQBI6BK6KgtiFArkG47XK73xIQ/edit# > > 在 2019年6月6日星期四 UTC+8下午7:25:08,Gergely Födémesi写道: >> >> Maybe the detail you are looking for is something like this: >> https://blog.golang.org/ismmkeynote >> >> >> On 6/6/19, ding liu <liudi...@gmail.com> wrote: >> > I cann`t find any infomation about "assist garbage collection" with >> google, >> > >> > so what`s the purpose of "assist garbage collection"? >> > >> > -- >> > 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 golan...@googlegroups.com. >> > To view this discussion on the web visit >> > >> https://groups.google.com/d/msgid/golang-nuts/9f648a2f-33a2-4097-b503-35ba558f728e%40googlegroups.com. >> >> > For more options, visit https://groups.google.com/d/optout. >> > >> > -- > 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/6599bb70-3aaf-48ed-b17d-fbe997c0242a%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/6599bb70-3aaf-48ed-b17d-fbe997c0242a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- J. -- 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/CAGrdgiX6EL3TF6%2Bbv6rPLANEJaf41j%3DDrpBhoVfLNhrKx7gurw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.