<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/save-up-to-14-percent-cpu-with-continuous-profile-guided-optimization-for-go-nxlybdfiu" -->

---
title: Save up to 14 percent CPU with continuous profile-guided...
description: Reduce CPU usage of Go services by up to 14% with continuous profile-guided optimization. Add a one-line command in your CI pipeline to utilize datadog-pgo...
canonical: https://daily.dev/posts/save-up-to-14-percent-cpu-with-continuous-profile-guided-optimization-for-go-nxlybdfiu
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Save up to 14 percent CPU with continuous profile-guided optimization for Go | daily.dev
og:description: Reduce CPU usage of Go services by up to 14% with continuous profile-guided optimization. Add a one-line command in your CI pipeline to utilize datadog-pgo...
og:url: https://daily.dev/posts/save-up-to-14-percent-cpu-with-continuous-profile-guided-optimization-for-go-nxlybdfiu
og:image: https://api.daily.dev/og/posts/NXLybDfiu.png
og:image:alt: Save up to 14 percent CPU with continuous profile-guided optimization for Go
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Save up to 14 percent CPU with continuous profile-guided optimization for Go

**[Datadog](https://daily.dev/sources/datadog)** · 6 min read · 4 upvotes · 3 comments

## Summary

Reduce CPU usage of Go services by up to 14% with continuous profile-guided optimization. Add a one-line command in your CI pipeline to utilize datadog-pgo tool. Experiment conducted with Go 1.21 showed 5.4% reduction in CPU time. Smaller services can also benefit from PGO. Go 1.22 offers potential gains of up to 14%.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.datadoghq.com/blog/datadog-pgo-go/>

## Community discussion

Top comments from developers on daily.dev.

**@ahmetozel** · 0 upvotes

> The one-line CI integration is the interesting part, because PGO's historical problem was never the technique. It was that profiles went stale and nobody regenerated them, so the win decayed silently until someone re-measured. Continuous collection turns it from a release ritual into something that tracks the workload. The caveat worth stating: the profile is only as representative as the traffic it came from. Collect during quiet hours or from a single region and you optimise for a shape your peak traffic does not have, which shrinks the gain or inverts it. Worth confirming the collection...

**@ahmetozel** · 0 upvotes

> The one-line CI integration is the interesting part, because PGO's historical problem was never the technique. It was that profiles went stale and nobody regenerated them, so the win decayed silently until someone re-measured. Continuous collection turns it from a release ritual into something that tracks the workload. The caveat worth stating: the profile is only as representative as the traffic it came from. Collect during quiet hours or from a single region and you optimise for a shape your peak traffic does not have, which shrinks the gain or inverts it. Worth confirming the collection...

**@ahmetozel** · 0 upvotes

> The one-line CI integration is the interesting part, because PGO's historical problem was never the technique. It was that profiles went stale and nobody regenerated them, so the win decayed silently until someone re-measured. Continuous collection turns it from a release ritual into something that tracks the workload. The caveat worth stating: a profile is only as representative as the traffic it came from, so collecting during quiet hours or from one region optimises for a shape your peak does not have.

---

Tags: [#devops](https://daily.dev/tags/devops), [#golang](https://daily.dev/tags/golang)

[View this post on daily.dev](https://daily.dev/posts/save-up-to-14-percent-cpu-with-continuous-profile-guided-optimization-for-go-nxlybdfiu)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Save up to 14 percent CPU with continuous profile-guided optimization for Go","url":"https://daily.dev/posts/save-up-to-14-percent-cpu-with-continuous-profile-guided-optimization-for-go-nxlybdfiu","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/save-up-to-14-percent-cpu-with-continuous-profile-guided-optimization-for-go-nxlybdfiu"},"datePublished":"2024-05-13T17:12:55.043Z","dateModified":"2024-05-13T17:12:52.957Z","description":"Reduce CPU usage of Go services by up to 14% with continuous profile-guided optimization. Add a one-line command in your CI pipeline to utilize datadog-pgo...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/867dfe353a8b9243af7d8205ae0ab517?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/867dfe353a8b9243af7d8205ae0ab517?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Datadog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Datadog","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/8f9d7e3e4bd64bd7b9db9b2ea83e0c6a","url":"https://daily.dev/sources/datadog"},"commentCount":3,"discussionUrl":"https://daily.dev/posts/save-up-to-14-percent-cpu-with-continuous-profile-guided-optimization-for-go-nxlybdfiu","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"keywords":"devops,golang","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Datadog","item":"https://daily.dev/sources/datadog"},{"@type":"ListItem","position":3,"name":"Save up to 14 percent CPU with continuous profile-guided optimization for Go"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/save-up-to-14-percent-cpu-with-continuous-profile-guided-optimization-for-go-nxlybdfiu","comment":[{"@type":"Comment","text":"The one-line CI integration is the interesting part, because PGO’s historical problem was never the technique. It was that profiles went stale and nobody regenerated them, so the win decayed silently until someone re-measured. Continuous collection turns it from a release ritual into something that tracks the workload. The caveat worth stating: the profile is only as representative as the traffic it came from. Collect during quiet hours or from a single region and you optimise for a shape your peak traffic does not have, which shrinks the gain or inverts it. Worth confirming the collection window covers your real peak mix before trusting the number.","datePublished":"2026-09-20T20:37:54.320Z","url":"https://daily.dev/posts/NXLybDfiu#c-zLQQuDNRq","author":{"@type":"Person","name":"Ahmet Özel","url":"https://daily.dev/ahmetozel","image":"https://avatars.githubusercontent.com/u/70992231?v=4"}},{"@type":"Comment","text":"The one-line CI integration is the interesting part, because PGO’s historical problem was never the technique. It was that profiles went stale and nobody regenerated them, so the win decayed silently until someone re-measured. Continuous collection turns it from a release ritual into something that tracks the workload. The caveat worth stating: the profile is only as representative as the traffic it came from. Collect during quiet hours or from a single region and you optimise for a shape your peak traffic does not have, which shrinks the gain or inverts it. Worth confirming the collection window covers your real peak mix before trusting the number.","datePublished":"2026-09-20T20:38:54.341Z","url":"https://daily.dev/posts/NXLybDfiu#c-Mu0xzCuOp","author":{"@type":"Person","name":"Ahmet Özel","url":"https://daily.dev/ahmetozel","image":"https://avatars.githubusercontent.com/u/70992231?v=4"}},{"@type":"Comment","text":"The one-line CI integration is the interesting part, because PGO’s historical problem was never the technique. It was that profiles went stale and nobody regenerated them, so the win decayed silently until someone re-measured. Continuous collection turns it from a release ritual into something that tracks the workload. The caveat worth stating: a profile is only as representative as the traffic it came from, so collecting during quiet hours or from one region optimises for a shape your peak does not have.","datePublished":"2026-09-20T21:02:17.372Z","url":"https://daily.dev/posts/NXLybDfiu#c-PKnuNxt0m","author":{"@type":"Person","name":"Ahmet Özel","url":"https://daily.dev/ahmetozel","image":"https://avatars.githubusercontent.com/u/70992231?v=4"}}]}
```

