AppDynamics Knowledge Base

Understanding CPU and Memory Metrics for Kubernetes Pods in AppDynamics Cluster Agent UI

Understanding CPU and Memory Metrics for Kubernetes Pods in AppDynamics Cluster Agent UI

Overview

When monitoring Kubernetes workloads using AppDynamics' Cluster Agent, users often observe a mismatch or confusion between the Memory (MB) values in the table and the Usage% shown in pod detail graphs. This article explains how CPU and memory metrics are computed, displayed, and what to expect when resource limits are or are not defined.

 

Ask 1: How is CPU% Busy calculated for Pods?

AppDynamics uses the following logic:

  • If CPU limits are defined in the pod spec, the CPU%Busy is calculated relative to the defined limit.

  • If limits are not set, AppDynamics falls back to node-level CPU usage, and percentage values may not reflect actual pod utilization.

 

Ask 2: Does the same logic apply to Memory (MB)?

Not exactly.

  • Memory (MB) is always collected as the raw value used by the container.

  • Memory usage % (Usage%) is only calculated and displayed if a memory limit is defined.

  • If no memory limit is set, AppDynamics may still show MB used in the table view, but the Usage% will remain at 0%, as no denominator is available for calculation.

 

Ask 3: Why does the graph show 0% even when memory is consumed?

This behavior is expected when no resource limits are set. AppDynamics cannot calculate a percentage of memory used if there's no defined upper limit to compare against.

 

Screenshot Summary:

  1. Screenshot 1: Pod list view

    • Shows the AppDynamics Operator pod using 11.84 MB memory with 1% CPU.

appdynamics-operator-pod.png

 2. Screenshot 2: Pod container view (with limits defined)

  • Graph shows 11.91% memory usage out of 100Mi defined.

appdynamics-operator-pod-percent.png


 

   3. Screenshot 3: Pod container view (without limits)

  • NodeJS pod consuming 33 MB memory but graph shows 0% usage.Screenshot-1-pod-page.png

    Screenshot-2-pod-container-page.png

 

 

Verifying Pod Resource Limits:

To check if a pod has limits defined:

kubectl get pod <pod-name> -n <namespace> -o jsonpath="{.spec.containers[*].resources.limits}"

 

If output is empty ({}), no limits are set, and usage% will show 0%.

 

Conclusion:

  • Always refer to the table for actual memory used (MB).

  • Usage% depends on resource limits being set.

  • No bug here – this is by design, and understanding this helps interpret the UI accurately.

 

Recommendations:

  • Set CPU and memory limits in pod specs for better visibility and scaling insights.

  • Use kubectl top pod to cross-verify values if needed.

Version history
Last update:
‎06-24-2025 09:57 AM
Updated by:
Contributors