How Changing One Constant Reduced Our CI Memory Usage By 70% - Blog
Blog post from Coder
In a bid to address escalating memory usage issues during testing, the engineering team at Coder identified that the root cause was not the suspected Postgres database, but rather Wireguard's buffer allocation behavior during automated tests. Initially, the team assumed that Postgres was responsible for the high memory usage, which reached nearly 25GB, but further investigation using Go's profiling tools revealed that Wireguard's message buffers were the primary contributors to the memory consumption. By modifying a Wireguard constant, IdealBatchSize, specifically for test scenarios, they achieved a 70% reduction in memory usage without impacting production performance. This adjustment involved a couple of lines of code and was facilitated by Go build flags, which allowed the team to maintain the same functional behavior while addressing the memory bottleneck. The experience underscored the importance of data-driven debugging and careful analysis, leading to improved test efficiency and system performance.
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.