Profile-guided optimisation (PGO) on Grab services
Jun 5, 2024Yonghao Hu

Summary
This post details the adoption of Profile-Guided Optimization (PGO) for Grab's Go services. It explains how to enable PGO by profiling services to obtain pprof files and then incorporating these profiles into the Go build process. The post presents case studies for TalariaDB, demonstrating significant reductions in CPU (10%), memory (30%), and volume usage (38%), along with an increase in ingested event count per CPU. It also discusses an experiment with the Catwalk service, where the effort to enable PGO outweighed the observed 5% improvement. The post highlights the challenges of enabling PGO for monorepo services and concludes that its applicability varies across services.