How a fix in Go 1.9 sped up our Gitaly service by 30x
Blog post from GitLab
Gitaly, a Git RPC service being implemented across GitLab.com to replace the legacy NFS-based file-sharing system, encountered unexpected performance issues during its rollout, despite initial promising latency improvements. After deploying a new release, latency dropped significantly without any apparent optimization, but this was followed by a pattern of increasing latency and eventual server lockups, suggesting a deeper issue. Investigations using profiling tools and metrics indicated that the problem stemmed from the Gitaly service's use of the syscall.ForkLock, which led to contention and lockups. This contention was exacerbated by the increasing virtual memory size of the Gitaly process, causing fork operations to take longer over time. The breakthrough came with the realization that switching from fork to posix_spawn, a change included in the new Go 1.9 release, could alleviate these issues. After recompiling Gitaly with Go 1.9, the team observed dramatic improvements in CPU usage and latency, resolving the performance problems and highlighting the importance of robust application monitoring and profiling tools in diagnosing complex system issues.
No tracked trend matches for this post yet.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.