Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Frequent GC caused by insufficient memory #35613
I'm not sure this report is actionable. If you are running on a low-memory machine and you allocate a lot, it's unavoidable that the GC will consume a fair amount of CPU, since it has a lot of work to do.
The only way to fix this is to change your program to allocate less. This will lower the CPU load (at least the part of it the GC is responsible of).
Another solution would be to decrease GOGC (e.g. you could set GOGC=50), that would lower the GC's cpu usage, but it'll increase the used memory, so you likely cannot afford to do this on a low-memory machine.
Also the garbage collector has improved since 1.10. The current release is 1.13.
The garbage collector team is always happy to get test cases they can use to test the garbage collector. But without a lot more information, there is nothing we can do here.