• Log inStart now

Python runtime metrics

The Python agent records runtime metrics to allow you to analyze the performance of your Python processes and interpreter. This includes metrics related to CPU usage, memory usage, and garbage collection.

CPU Usage

With CPU runtime metrics, you can monitor CPU usage by examining user and system CPU utilization, and also see time spent in different components of the CPU. The following CPU usage metrics are available:

  • CPU Time: Track the amount of time being spent in different states of the CPU. This includes user (time running application code) and system (time spent in the operating system). This metric is represented as total elapsed time in seconds.
  • CPU Utilization: Analyze the amount of processing resources being utilized over time by different components of the CPU. This includes the user component (for running application code) and system component (for running kernel code). This metric is reported as a percentage representing the time spent in the specified CPU component divided by total elapsed CPU time.

Memory Usage

You can monitor your system’s overall memory consumption and utilization by process and host. The following memory usage metrics are available:

  • Total Physical Memory: Monitor the amount of total physical memory in megabytes being used by your system over time. This metric is also available for individual process IDs.
  • Memory Utilization: Track memory utilization over time for your system and for individual processes. This metric is represented by the value of the total physical memory being used by your system (or a specific process) divided by the total amount of memory available.

Garbage Collection

Important

Garbage collection profiling is available in Python agent version 6.2.0.156 and higher and is disabled by default in the agent. To enable it, check out our documentation here.

The garbage collector finds unused data objects and reclaims that memory space so it can be used by another process. The Python agent provides the following garbage collection metrics:

Copyright © 2023 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.