
Go, don't collect my garbage
11/13/2017
This post details an investigation into the performance impact of Go's garbage collector (GC) on multi-core machines. The author benchmarks ECDSA P256 signing operations across different numbers of goroutines, observing a performance drop with increasing goroutines due to frequent and expensive GC cycles. The post demonstrates how tuning the GOGC variable, which controls the GC target percentage, can significantly improve performance by reducing GC frequency. Disabling the GC entirely (`GOGC=off`) yields the highest throughput, but tuning GOGC to an optimal value (e.g., 11,300) provides a substantial performance boost while maintaining a sustainable GC strategy. This highlights the importance of understanding and tuning GC behavior for performance-critical applications on multi-core systems.
