Skip to content

[Workers] Add memory usage metrics changelog and docs#31695

Open
nevikashah wants to merge 3 commits into
cloudflare:productionfrom
nevikashah:nevi/memory-usage-metrics
Open

[Workers] Add memory usage metrics changelog and docs#31695
nevikashah wants to merge 3 commits into
cloudflare:productionfrom
nevikashah:nevi/memory-usage-metrics

Conversation

@nevikashah

Copy link
Copy Markdown
Contributor

What this PR does

Adds documentation for the new Memory Usage chart in Workers Observability Metrics tab.

Changes

  1. Changelog entry (src/content/changelog/workers/2026-06-25-memory-usage-metrics.mdx)

    • Announces the new Memory Usage chart for Workers and Durable Objects
    • Explains what memory usage measures (V8 isolate memory per invocation)
    • Links to isolates docs, memory limits, DevTools profiling, and GraphQL API
  2. Workers metrics docs (src/content/docs/workers/observability/metrics-and-analytics.mdx)

    • Adds a new ### Memory usage section between Execution Duration and Invocation Statuses
    • Explains the chart (P50/P90/P99/P999 percentiles), the per-isolate memory model, deployment markers, and links to DevTools memory profiling
  3. Screenshot (src/assets/images/changelog/workers/observability/2026-06-25-memory-usage.png)

Related

  • GraphQL API: WO-1323 (exposes memoryUsageBytes and wasmMemoryBytes fields on workersInvocationsAdaptive)

- Add changelog entry for memory usage visibility in Workers Metrics tab
- Add Memory usage section to Workers observability metrics-and-analytics page
- Add screenshot of Memory usage chart
@nevikashah nevikashah requested review from a team, irvinebroque and vy-ton as code owners June 25, 2026 13:41
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review

⏸️ Automatic reviews for this PR are paused.

This PR has already received 2 automatic reviews. To run another review, a codeowner can comment /review or /full-review. To permanently lift the limit for this PR, a codeowner can comment /ignore-review-limit.

Tip: Keep PRs in draft mode until they are ready for review — the bot skips draft PRs automatically.


✅ No issues found in commit bc6cbbc.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

✅ No code review issues found.

Style Guide Review

✅ No style-guide issues found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.

- Remove broken link to DO metrics page from changelog
- Rephrase 'per invocation' to 'at the time of each invocation' to avoid implying per-request allocation
- Replace 'Learn more about' with 'Refer to' per style guide
Comment thread src/content/changelog/workers/2026-06-25-memory-usage-metrics.mdx Outdated

Memory usage metrics are also available for [Durable Objects](/durable-objects/observability/metrics-and-analytics/).

To view memory usage, go to **Workers & Pages**, select your Worker, and open the **Metrics** tab. You can also query memory usage programmatically via the [GraphQL Analytics API](/analytics/graphql-api/tutorials/querying-workers-metrics/) using the `workersInvocationsAdaptive` dataset — the `quantiles.memoryUsageBytesP50` through `quantiles.memoryUsageBytesP999` fields return percentile values in bytes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about for Durable Objects?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the experience is almost the same except but on the DO page with 1 addition, @nevikashah can you also mention on the DO metrics tab you are able to filter by DO ID or Name so you can drill down and understand if that DO ran into issues because of memory?


![Memory usage chart showing P50, P90, P99, and P999 percentiles with deployment markers](~/assets/images/changelog/workers/observability/2026-06-25-memory-usage.png)

Memory usage measures the V8 [isolate](/workers/reference/how-workers-works/#isolates) memory at the time of each invocation. This is the same memory pool subject to the [128 MB per-isolate limit](/workers/platform/limits/#memory) — a single isolate can handle many concurrent requests and shares memory across them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not call this a "pool"? Similar in concept but not literally what this is?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a single isolate can handle many concurrent requests and shares memory across them.

@iglesiasbrandon @vy-ton need to make sure we are explaining Durable Objects model here / somewhere / link to somewhere — to the extent reader needs to understand this in order to understand what the DO metric is or means

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iglesiasbrandon worth you drafting section in DO docs to capture the DO memory model

Comment thread src/content/changelog/workers/2026-06-25-memory-usage-metrics.mdx Outdated

Memory usage metrics are also available for [Durable Objects](/durable-objects/observability/metrics-and-analytics/).

To view memory usage, go to **Workers & Pages**, select your Worker, and open the **Metrics** tab. You can also query memory usage programmatically via the [GraphQL Analytics API](/analytics/graphql-api/tutorials/querying-workers-metrics/) using the `workersInvocationsAdaptive` dataset — the `quantiles.memoryUsageBytesP50` through `quantiles.memoryUsageBytesP999` fields return percentile values in bytes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the experience is almost the same except but on the DO page with 1 addition, @nevikashah can you also mention on the DO metrics tab you are able to filter by DO ID or Name so you can drill down and understand if that DO ran into issues because of memory?

Comment thread src/content/changelog/workers/2026-06-25-memory-usage-metrics.mdx Outdated
@iglesiasbrandon

Copy link
Copy Markdown
Collaborator

We could also mention this in: /durable-objects/reference/in-memory-state/

- Add durable-objects to products frontmatter
- Link to both Workers and Durable Objects in opening sentence
- Remove 'pool' from memory description
- Add DO-specific paragraph about in-memory state and hibernation
- Replace viewing instructions with deep links and DO filter-by-ID mention
- Update date to 2026-06-26 and rename files accordingly
@irvinebroque

Copy link
Copy Markdown
Contributor

@iglesiasbrandon just update the PR / make a PR that bases off this and suggests changes back into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants