<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/cloudflare-brings-on-demand-cpu-and-memory-profiling-to-production-workers-y3nkgmsrb" -->

---
title: Cloudflare Brings On-Demand CPU and Memory Profiling to...
description: Cloudflare now offers on-demand CPU and memory profiling for Workers and Durable Objects in production, generating interactive flamegraphs via the Workers...
canonical: https://daily.dev/posts/cloudflare-brings-on-demand-cpu-and-memory-profiling-to-production-workers-y3nkgmsrb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Cloudflare Brings On-Demand CPU and Memory Profiling to Production Workers | daily.dev
og:description: Cloudflare now offers on-demand CPU and memory profiling for Workers and Durable Objects in production, generating interactive flamegraphs via the Workers...
og:url: https://daily.dev/posts/cloudflare-brings-on-demand-cpu-and-memory-profiling-to-production-workers-y3nkgmsrb
og:image: https://api.daily.dev/og/posts/Y3NKGmSRb.png
og:image:alt: Cloudflare Brings On-Demand CPU and Memory Profiling to Production Workers
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.

# Cloudflare Brings On-Demand CPU and Memory Profiling to Production Workers

**[InfoQ](https://daily.dev/sources/infoq)** · 4 min read · 0 upvotes · 0 comments

## Summary

Cloudflare now offers on-demand CPU and memory profiling for Workers and Durable Objects in production, generating interactive flamegraphs via the Workers Observability dashboard or cf CLI. Announced October 9, 2026, the feature profiles an already-running isolate under real traffic rather than a fresh one. CPU profiling samples call stacks at one-millisecond intervals without holding the isolate lock the whole time. Internally, Cloudflare used it to fix a recursive JSON replacer, making a function a claimed 2.7 times faster, and cut a Worker's 99.9th-percentile memory from 133 MB to 118 MB. Profiles can be downloaded for offline analysis with pprof. Cloudflare says it is working towards continuous profiling.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.infoq.com/news/2026/10/cloudflare-cpu-memory-profiling>

## Questions this post answers

### How does Cloudflare's on-demand profiling for Workers work in production?

It captures CPU or heap-allocation profiles from an already-running isolate rather than starting a fresh one, letting you inspect live production traffic. CPU profiling uses a V8 profiler sampling at one-millisecond intervals and releases the isolate lock between samples so requests keep executing. Results appear as interactive flamegraphs in the Workers Observability dashboard or via the cf CLI, and profiles can be downloaded for offline analysis with pprof.

_daily.dev surfaces platform updates like this for teams debugging performance on Cloudflare Workers._

### What is the difference between CPU profiling and memory profiling for debugging a Cloudflare Worker?

CPU profiling samples call stacks to show where execution time goes, revealing expensive functions and redundant computation, while memory profiling tracks allocations to find code generating excessive objects or memory pressure. A function can consume heavy CPU without allocating much memory, or allocate heavily without dominating execution time, so picking the right profile type narrows the investigation to the actual bottleneck.

_Engineers choosing between profiling approaches can track these distinctions through daily.dev._

### How much can fixing a recursive JSON replacer improve Worker CPU performance?

Cloudflare found a recursive JSON replacer inside an R2 binding Worker that repeatedly traversed nested data, causing redundant work, and fixing the implementation made the function a claimed 2.7 times faster. A separate profile also revealed a duplicate metrics call accounting for about 1% of CPU time, showing how small inefficiencies compound in production workers.

_Developers chasing CPU regressions in serverless functions can follow cases like this on daily.dev._

## Similar posts on daily.dev

- [Introducing on-demand CPU and memory profiling with flamegraphs for Workers and Durable Objects](https://daily.dev/posts/introducing-on-demand-cpu-and-memory-profiling-with-flamegraphs-for-workers-and-durable-objects-dpdget4vv) · Cloudflare · 2 upvotes · 0 comments
- [A Disabled Metrics Hook Pushed a Worker Past 128 MB. Profiling Found It.](https://daily.dev/posts/a-disabled-metrics-hook-pushed-a-worker-past-128-mb-profiling-found-it--yfeq3xrqs) · Medium · 0 upvotes · 0 comments
- [Node.js CPU and Heap Profiling with Shareable Flame Graphs](https://daily.dev/posts/node-js-cpu-and-heap-profiling-with-shareable-flame-graphs-q11btrkcn) · Platformatic · 35 upvotes · 0 comments
- [How Cloudflare Eliminates Cold Starts for Serverless Workers](https://daily.dev/posts/how-cloudflare-eliminates-cold-starts-for-serverless-workers-cy0axotzo) · ByteByteGo · 2 upvotes · 0 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#observability](https://daily.dev/tags/observability), [#cloudflare](https://daily.dev/tags/cloudflare)

[View this post on daily.dev](https://daily.dev/posts/cloudflare-brings-on-demand-cpu-and-memory-profiling-to-production-workers-y3nkgmsrb)

```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":"Cloudflare Brings On-Demand CPU and Memory Profiling to Production Workers","url":"https://daily.dev/posts/cloudflare-brings-on-demand-cpu-and-memory-profiling-to-production-workers-y3nkgmsrb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/cloudflare-brings-on-demand-cpu-and-memory-profiling-to-production-workers-y3nkgmsrb"},"datePublished":"2026-10-23T12:03:39.788Z","dateModified":"2026-10-23T12:04:14.151Z","description":"Cloudflare now offers on-demand CPU and memory profiling for Workers and Durable Objects in production, generating interactive flamegraphs via the Workers...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a8d23b12c183d4c88f3464a3b1fbee35?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a8d23b12c183d4c88f3464a3b1fbee35?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"InfoQ","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":"InfoQ","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/afc3bced3e1e4b188dd9127017a60e0c","url":"https://daily.dev/sources/infoq"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/cloudflare-brings-on-demand-cpu-and-memory-profiling-to-production-workers-y3nkgmsrb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,observability,cloudflare","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"InfoQ","item":"https://daily.dev/sources/infoq"},{"@type":"ListItem","position":3,"name":"Cloudflare Brings On-Demand CPU and Memory Profiling to Production Workers"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/cloudflare-brings-on-demand-cpu-and-memory-profiling-to-production-workers-y3nkgmsrb#faq","mainEntity":[{"@type":"Question","name":"How does Cloudflare's on-demand profiling for Workers work in production?","acceptedAnswer":{"@type":"Answer","text":"It captures CPU or heap-allocation profiles from an already-running isolate rather than starting a fresh one, letting you inspect live production traffic. CPU profiling uses a V8 profiler sampling at one-millisecond intervals and releases the isolate lock between samples so requests keep executing. Results appear as interactive flamegraphs in the Workers Observability dashboard or via the cf CLI, and profiles can be downloaded for offline analysis with pprof. daily.dev surfaces platform updates like this for teams debugging performance on Cloudflare Workers."}},{"@type":"Question","name":"What is the difference between CPU profiling and memory profiling for debugging a Cloudflare Worker?","acceptedAnswer":{"@type":"Answer","text":"CPU profiling samples call stacks to show where execution time goes, revealing expensive functions and redundant computation, while memory profiling tracks allocations to find code generating excessive objects or memory pressure. A function can consume heavy CPU without allocating much memory, or allocate heavily without dominating execution time, so picking the right profile type narrows the investigation to the actual bottleneck. Engineers choosing between profiling approaches can track these distinctions through daily.dev."}},{"@type":"Question","name":"How much can fixing a recursive JSON replacer improve Worker CPU performance?","acceptedAnswer":{"@type":"Answer","text":"Cloudflare found a recursive JSON replacer inside an R2 binding Worker that repeatedly traversed nested data, causing redundant work, and fixing the implementation made the function a claimed 2.7 times faster. A separate profile also revealed a duplicate metrics call accounting for about 1% of CPU time, showing how small inefficiencies compound in production workers. Developers chasing CPU regressions in serverless functions can follow cases like this on daily.dev."}}]}
```

