They had said they were generating almost no garbage. If that is true, I suspect they could have avoided the 2-minute forced GC by running with GOGC=off, or alternatively executed SetGCPercent(-1) (https://golang.org/pkg/runtime/debug/#SetGCPercent) to disable the GC programmatically after reaching steady-state.
Perhaps what would have worked for them. If needed, perhaps they could have also had a helper goroutine that ran, say, once an hour to run runtime.GC() manually, or once a day or whatever frequency might have seemed rationale based on their workload. I suspect that would have been sufficient as a simple workaround? thepudds On Monday, February 10, 2020 at 12:02:45 PM UTC-5, Jake Montgomery wrote: > > runtime.GC() would not work for them. According to the docs - " > <https://golang.org/pkg/runtime/#GC>GC runs a garbage collection and > blocks the caller until the garbage collection is complete. It may also > block the entire program." So that would be very counter productive in this > case. > > On Monday, February 10, 2020 at 5:10:37 AM UTC-5, Kevin Chadwick wrote: >> >> On 2020-02-09 14:52, ffm...@web.de wrote: >> > >> > Aside from that it would be nice if that 2-minutes GC trigger, that is >> mentioned >> > in the text, could be removed or lessened. >> >> runtime.GC()? >> >> Though I recall that they found an alternative from the text? >> > -- 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/66bcc92e-1627-4733-9b27-7d839fdae30c%40googlegroups.com.