1.8.3 Monitoring the CPU resource
This subsection explains how to monitor the CPU resource of a Podman environment.
- Organization of this subsection
(1) Overview
In a Podman environment, multiple containers share the physical server's CPUs.
The CPU resources of the physical server are distributed according to each container's CPU resources requirement. However, if the combined total of the CPU resource requirements for the individual containers exceeds the CPU resources on the physical server, the required amount of CPU resources cannot be distributed, resulting in a virtual CPU resource shortage. This adversely affects the performance of the container.
By monitoring CPU performance data, you can detect such performance deterioration in the containers, and thus you can take appropriate corrective action.
The following four records are used to monitor the CPU resource. For details about records, see 5. Records.
-
PI record
This record is used to monitor the performance data of the physical server's CPUs.
-
PI_HCI record
This record is used to monitor the performance data of each core of the physical CPUs.
-
PI_VI record
This record is used to monitor the performance data of the physical server's CPUs that are being used by each container.
-
PI_VCI record
This record is used to monitor the performance data of each core of the physical CPUs.
The following figure shows the range of performance data collected in each record.
(2) Monitoring examples
Using CPU resource monitoring on Physical server as an example, this subsection explains the factors that cause insufficient CPU resources, and how to solve this problem. The following figure shows the items monitored here and the flow of actions to take.
(a) Example of monitoring CPU usage of the container working on the physical server
You can check the CPU usage rate for the container working on the physical server in the VM Used field of the PI record.
An example of monitoring is shown below. This example is based on using the monitoring template to display a Host CPU Used Status report. The chart in this report displays the VM Used field that indicates the CPU usage for the container. To monitor the VM Used field, check the table that is displayed under the chart.
- Monitoring template report to be checked
In this example, the CPU usage of the container working on the physical server has increased. If the CPU usage is high and the container's performance is poor, you should stop containers that are not necessary. If the problem persists, consider either adding a physical CPU or adding a physical server.
(b) Example of monitoring the CPU usage rate for containers
You can check the CPU usage rate for each container in the Used % field of the PI_VI record.
An example of monitoring is shown below. This example is based on using the monitoring template to display a VM CPU Trend report. The chart in this report displays the Used % field that indicates the CPU usage rate for the container. To monitor the Used % field, check the table that is displayed under the chart.
- Monitoring template report to be checked
In this example, the CPU usage rate of container1 is high. If there is a problem with container1, stop the container. If the problem persists, consider moving the container to a different physical server.