Go Lock Performance Traps: From sync.Mutex to Spinlock Tuning
A seemingly simple concurrent Map access, performance crashes under high concurrency. pprof shows 90% of time spent in sync.Mutex.Lock. This post documents the investigation and performance comparison of different lock strategies.