Home / Companies / Cloudflare / Blog / Post Details
Content Deep Dive

Reclaiming CPU for free with Go's Profile Guided Optimization

Blog post from Cloudflare

Post Details
Company
Date Published
Author
Colin Douch
Word Count
1,278
Company Posts That Month
12
Language
English
Hacker News Points
-
Post removed?
No
Summary

Golang 1.20 introduced Profile Guided Optimization (PGO), which allows guiding the compiler to introduce optimizations based on real-world behavior of a system. PGO can lead to CPU usage reductions, freeing up resources for better customer service. The process involves compiling a non-PGO binary and deploying it to production, collecting CPU profiles from the binary in production, and then compiling a second binary using that CPU profile. An example is provided where PGO was used on Cloudflare's "wshim" system, leading to significant CPU usage reductions. Future work includes automating profile collection, refining deployment processes, and implementing further improvements with other optimization techniques.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Observability 2 871 206 85 -29%
Use This Data

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.