GopherCon 2024: Automating Efficiency Improvement by Profile Guided Optimization - Jin Lin

GopherCon 2024: Automating Efficiency Improvement by Profile Guided Optimization - Jin Lin

716 Lượt nghe
GopherCon 2024: Automating Efficiency Improvement by Profile Guided Optimization - Jin Lin
To manage our operational stack effectively, optimizing container utilization is crucial. This ensures a more efficient scaling process as our business grows, reducing overall CPU allocation and, in turn, lowering costs. Profile-guided optimization is a compiler technique that involves incorporating information (a profile) gathered from representative runs of the application back into the compiler for the subsequent build of the application. This information is then utilized by the compiler to enable more aggressive optimizations including the inlining and de-virtualizations. This presentation encompasses various aspects, such as integrating Profile-Guided Optimization (PGO) into the Bazel build, pre-processing PGO profiles, making compiler configuration adjustments, collecting service code profiles, and obtaining PGO data from running production containers. To our knowledge, we are the pioneering company capable of deploying fleet-wide Go services built with PGO, resulting in an average reduction of more than 15000 CPU cores per year. We are eager to share our experiences with you.