docs(magic-containers): clarify CPU usage metric units - #372
Open
zvonegit wants to merge 1 commit into
Open
Conversation
Document that the Magic Containers CPU usage metric (exposed via the averageCPU API field) is reported relative to the app's CPU limit (8 CPUs on the dynamic runtime), not as absolute cores, so it reads roughly 12.5x higher than measured core usage. Clarify that memory usage is absolute and that billing is computed separately from actual CPU time, so it is unaffected by this scaling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WN6MhYRwbNZiifuUFxV3YH
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
A customer reported that the Magic Containers CPU metric (
averageCPUfromGET /mc/apps/{appId}/overview, also shown on the dashboard Statistics tab) looked overstated by ~10–50× compared to CPU usage measured from inside their containers.This is not a bug — the metric is reported relative to the application's CPU limit (8 CPUs on the dynamic runtime), not as absolute cores, so it reads roughly 12.5× higher than raw core usage. The unit was previously undocumented, which made it easy to misread as cores. This PR documents the actual semantics.
Changes
magic-containers/monitoring.mdx— Expanded the CPU usage metric description to explain it is measured relative to the 8-CPU limit (100%= full limit,12.5%= one core) and how to convert a reading to absolute cores. Clarified that memory usage is reported as an absolute value. Added a<Note>explaining that CPU usage is scaled to the CPU limit (so it looks ~12.5× higher than measured cores) and that billing is calculated separately from actual CPU time (CPU-seconds) and is therefore unaffected by this scaling.api-reference/magic-containers/overview.mdx— Added a Metric units section noting that CPU fields (e.g.averageCPU) are relative to the CPU limit while RAM fields (e.g.averageRAM) are absolute, with a link to the Monitoring page.Context
Reported via Slack: https://bunnycdn.slack.com/archives/C02R1SM8L12/p1785340101788189?thread_ts=1785260041.166399&cid=C02R1SM8L12
Generated by Claude Code