Hitachi

JP1 Version 12 JP1/Performance Management - Remote Monitor for Virtual Machine Description, User's Guide and Reference


1.6.3 Monitoring the CPU resource

This subsection explains how to monitor the CPU resource of a KVM system.

Organization of this subsection

(1) Overview

In a KVM system, multiple virtual machines share the physical server's CPU. The CPU resource allocated to each virtual machine is called a virtual CPU. The OS running on a virtual machine recognizes a virtual CPU as a normal physical CPU.

The CPU resource of the physical server is distributed according to each virtual machine's CPU resource requirement. However, if the combined total of the CPU resource requirements for the individual virtual machines exceeds the CPU resource on the physical server, the required amount of CPU resource cannot be distributed, resulting in a virtual CPU resource shortage. This adversely affects the performance of the virtual machine.

The schematic diagram below shows a state in which a virtual CPU resource shortage has occurred.

Figure 1‒54: Schematic diagram of a virtual CPU resource shortage

[Figure]

By monitoring CPU performance data, you can detect such performance deterioration in the virtual machines, and thus you can take appropriate corrective action.

Furthermore, in a virtual environment all physical devices are virtualized, such as memory, disks, and network interfaces. The CPU performs this virtualization of physical devices. Therefore, the CPU resource is an important resource that also affects the performance of other virtual devices.

The following four records are used to monitor the CPU resource. For details about records, see 5. Records.

  1. PI record

    This record is used to monitor the performance data of the physical server's CPU.

  2. PI_HCI record

    This record is used to monitor the performance data of each core of the physical CPU.

  3. PI_VI record

    This record is used to monitor the performance data of the CPU that is being used by each virtual machine.

  4. PI_VCI record

    This record is used to monitor the performance data of each virtual CPU.

The following figure shows the range of performance data collected in each record.

Figure 1‒55: Range of performance data collected in each record

[Figure]

(2) Monitoring examples

Using CPU resource monitoring on virtual machines vhost1 through vhost3 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.

Figure 1‒56: Monitored items and flow of actions

[Figure]

(a) Example of monitoring the CPU usage rate for virtual machines

You can check the CPU usage rate for virtual machines 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 Used Status report. The chart in this report displays the Used field that indicates the CPU usage for the virtual machines. To monitor the Used % field, check the table that is displayed under the chart.

Figure 1‒57: Example of monitoring the CPU usage for virtual machines

[Figure]

Monitoring template report to be checked

VM CPU Used Status

In this example, the CPU usage of vhost2 is high. If the performance of a virtual machine has degraded due to high CPU usage, review the number of allocated CPUs and other configuration information of the virtual environment. If the problem still cannot be solved, consider whether you can add physical CPUs or physical servers.