Skip to content
Uber
Uber logoUber · Feature trail

Go Runtime Stack Optimization

3 posts · Apr 2026 – Oct 2026

What this trail covers

Uber has optimized the performance of its Go services by fine-tuning the Go runtime's stack allocation mechanisms. This effort focuses on reducing CPU overhead by disabling adaptive stack expansion and shrinking, and instead pre-allocating stack sizes. A profile-guided approach automates the tuning process by analyzing CPU profiles to determine optimal static stack sizes for different services, leading to significant CPU savings. This post details optimizations to reduce object creation and memory consumption in translation services by switching from sync.Map to a map[string]string with RWMutex and implementing a hybrid in-memory/disk storage solution with sharding and LRU eviction.

All Uber trails