Grab
Grab logoGrab · Feature trail

Profile-Guided Optimization (PGO) for Go Services

2 posts · May 2023 – Jun 2024

What this trail covers

Grab has adopted Profile-Guided Optimization (PGO) for its Go services to improve performance and resource utilization. This involves collecting CPU profile data from production services and feeding it back into the Go compiler during the build process. Initial experiments on services like TalariaDB have shown significant reductions in CPU usage (around 10%), memory usage (around 30%), and persistent volume usage (around 38%). The effectiveness of PGO varies across services, with some requiring more effort than the gains provided, such as in the Catwalk service. Future improvements to `go-build` and PGO support for monorepo services are expected to drive greater adoption.

All Grab trails