From dc9425ac030a717e08b32ac1f4d7b83e178f7786 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 29 Jul 2026 15:53:54 +0000 Subject: [PATCH] docs(magic-containers): clarify CPU usage metric units 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 Claude-Session: https://claude.ai/code/session_01WN6MhYRwbNZiifuUFxV3YH --- api-reference/magic-containers/overview.mdx | 9 +++++++++ magic-containers/monitoring.mdx | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/api-reference/magic-containers/overview.mdx b/api-reference/magic-containers/overview.mdx index dd0e87d8..1d046e7c 100644 --- a/api-reference/magic-containers/overview.mdx +++ b/api-reference/magic-containers/overview.mdx @@ -26,3 +26,12 @@ curl --request GET \ Find your API key in the [account API Keys](https://dash.bunny.net/account/api-key). + +## Metric units + +Some fields returned by the API report usage in different units: + +- **CPU** (for example, `averageCPU`) is reported **relative to your application's CPU limit**, not as an absolute number of cores. On the dynamic runtime the limit is 8 CPUs, so the value is roughly 12.5× the number of cores the container actually uses. To convert it to absolute cores, multiply by the CPU limit and divide by 100. +- **RAM** (for example, `averageRAM`) is reported as an **absolute value**. + +For a full explanation of the dashboard metrics and how CPU usage relates to your CPU limit, see [Monitoring](/magic-containers/monitoring). diff --git a/magic-containers/monitoring.mdx b/magic-containers/monitoring.mdx index b96bc20d..4b85119b 100644 --- a/magic-containers/monitoring.mdx +++ b/magic-containers/monitoring.mdx @@ -31,8 +31,14 @@ The Statistics tab provides a range of metrics that give you a comprehensive vie - **Latency**: Latency measures the time it takes for a request to travel from the source to the destination and receive a response. In the context of Magic Containers, it indicates the responsiveness of your application. - **Instances and active regions**: This metric provides insights into the number of instances running your application and the active regions where these instances are distributed. - **Traffic served**: This measures the amount of data served by your application, providing insights into its overall usage. -- **CPU usage**: The central processing unit (CPU) monitors your application's usage, helping you understand the computational load. -- **Memory usage**: Tracks the memory consumption of your application, highlighting its memory usage patterns. +- **CPU usage**: Shows the processing power your application consumes, measured **relative to your application's CPU limit** rather than as an absolute number of cores. On the [dynamic runtime](/magic-containers/limits), that limit is 8 CPUs, so a reading represents utilization against all 8 CPUs: `100%` corresponds to the full 8-CPU limit and `12.5%` corresponds to a single full core. To convert a reading into absolute cores, multiply it by the CPU limit — for example, `cores = CPU usage (%) ÷ 100 × 8`. The value is averaged over the selected time window, so short bursts can push it well above the container's steady-state usage. +- **Memory usage**: Tracks the memory consumption of your application as an **absolute value** (for example, in MB), highlighting its memory usage patterns. + + + CPU usage is scaled to your application's CPU limit, while **memory usage is reported as an absolute value**. If you compare CPU usage directly against the number of cores you measure from inside your container, it will look higher — for example, roughly 12.5× higher on the dynamic runtime — because it is expressed as a percentage of the 8-CPU limit rather than as raw cores. + + This metric is intended for monitoring and is **not** the basis for billing. Billing is calculated separately from the actual CPU time (CPU-seconds) your containers consume, so it is unaffected by how CPU usage is scaled here. See [Pricing](/magic-containers/pricing) for details. + # Configuring display options