logo

Reclaiming CPU for free with Go's Profile Guided Optimization

ID: a434f814-5c19-5be6-ae02-4304db3eb505

STIX ID: report--a434f814-5c19-5be6-ae02-4304db3eb505

Feed Name: Cloudflare Blog

Date Published: 2024-05-14

Date Updated: 2026-04-27

Author: Colin Douch

...
...

Cloudflare’s Observability team outlines how they deployed Go 1.20’s Profile Guided Optimization (PGO) for the globally deployed wshim service to reduce CPU usage. They gathered representative CPU profiles from high-load Tier 1 datacenters via pprof, merged them, built with the -pgo flag, and measured ~3.5% immediate reduction (~97 cores) and ~71 cores saved on a 7-day average, validating the efficacy of PGO. The post also proposes next steps including automating profile collection, refining a two-step deployment approach, improving sampling strategies, and exploring BOLT/LTO.

Your team is not currently subscribed to this feed. You must subscribe to it in order to see this post.