Percentage Metric Denominators¶
The two Preview percentage metrics are the easiest way to reason about saturation in a dashboard, but they only make sense if you know what 100% means for your specific app.
| Metric | Numerator | Denominator | 100% means |
|---|---|---|---|
CpuPercentage | Replica CPU usage (nanocores) | Replica CPU limit (properties.template.containers[].resources.cpu × 1,000,000,000 nanocores per vCPU) | The replica is consuming its full configured CPU allotment |
MemoryPercentage | Replica working set (bytes) | Replica memory limit (properties.template.containers[].resources.memory converted to bytes) | The replica is consuming its full configured memory allotment |
Worked example¶
For an app provisioned with --cpu 0.5 --memory 1Gi:
CpuPercentage100% corresponds to 500,000,000 nanocores (0.5 vCPU).MemoryPercentage100% corresponds to 1,073,741,824 bytes (1 GiB).CpuPercentage10% corresponds to roughly 50,000,000 nanocores ofUsageNanoCores.MemoryPercentage50% corresponds to roughly 536,870,912 bytes ofWorkingSetBytes.
If you change the CPU/memory limits on a revision, the denominator changes for any new revision; percentage values across revisions are only directly comparable when the resource limits match.
Percentage metrics are not KEDA scaler utilization
The KEDA cpu and memory scalers report utilization against their own targets (the value you put in --scale-rule-metadata value=...). CpuPercentage and MemoryPercentage are independent Azure Monitor metrics. They can disagree on the same replica because the denominator and aggregation window differ. See CPU and memory scaler and Memory percentage vs. KEDA utilization.
See Also¶
- Metrics Overview
- Container App Metrics
- Environment Metrics
- Percentage Metrics
- Dimensions
- KEDA Observability
- Evidence and Captures