Tagged articles
6 articles
Page 1 of 1
BirdNest Tech Talk
BirdNest Tech Talk
Aug 28, 2024 · Backend Development

Why Go Channels Slow Down on More CPUs and How to Fix It

A Fastly engineer discovered that increasing CPU cores can degrade Go channel performance due to lock contention, and this article reproduces the benchmarks, explains why goroutine count—not CPU count—is the real culprit, and offers practical optimization techniques.

ChannelsGOMAXPROCSGo
0 likes · 10 min read
Why Go Channels Slow Down on More CPUs and How to Fix It
58 Tech
58 Tech
Apr 13, 2020 · Backend Development

Diagnosing and Optimizing High CPU Usage of a Go Service Migrated to Kubernetes Using Flame Graphs

This article describes how a Go‑based message‑push service migrated to a Kubernetes‑Docker container platform exhibited unexpectedly high CPU usage, the step‑by‑step profiling with go‑tool pprof and flame graphs, analysis of the Go GMP scheduler, and the resolution by configuring GOMAXPROCS to match the container‑allocated cores.

ContainerGOMAXPROCSGo
0 likes · 12 min read
Diagnosing and Optimizing High CPU Usage of a Go Service Migrated to Kubernetes Using Flame Graphs
Didi Tech
Didi Tech
Jan 5, 2020 · Backend Development

Investigation and Optimization of High‑Frequency Go Service Timeout in Containers

The study traced severe Redis latency spikes in an 8‑core container to the Go runtime mistakenly reading the host’s CPU count, which created hundreds of threads and scheduler contention; limiting GOMAXPROCS to the container’s quota eliminated the jitter, while further gains were suggested by reducing HMGET calls, tuning GC, and upgrading Go.

CPUContainerGOMAXPROCS
0 likes · 14 min read
Investigation and Optimization of High‑Frequency Go Service Timeout in Containers
Alibaba Cloud Native
Alibaba Cloud Native
Dec 25, 2019 · Backend Development

Master Go Panic/Recover, Thread Limits, and Error Handling – A Practical Guide

This article explores Go's panic/recover mechanism, identifies which runtime errors can be recovered, explains unrecoverable scenarios like thread exhaustion and map race, demonstrates best‑practice error handling with Go 1.13 features and popular error libraries, and offers concrete logging strategies for robust server development.

Error HandlingGOMAXPROCSGo
0 likes · 34 min read
Master Go Panic/Recover, Thread Limits, and Error Handling – A Practical Guide