VMmanager: Cluster usage. Technical details

From ISPWiki
Jump to: navigation, search
Hierarchy: VMmanager KVM ->STATISTICS
VMmanager Cloud ->STATISTICS

A cluster in VMmanager is a group of physical servers where virtual machines are running.

To view the cluster node statistics navigate to "Statistics" → "Cluster load".

Generating the report

"Cluster load"
  • Period — select a period to display the statistics:
  • previous day;
  • current day;
  • current week;
  • current month;
  • current year;
  • previous week;
  • previous month;
  • previous year;
  • week;
  • month;
  • quarter;
  • half-a-year;
  • year;
  • any period;
  • whole period.
  • Cluster nodes — select a cluster node to display the statistics.

The statistics :

  • outgoing traffic, GiB;
  • incoming traffic, GiB;
  • CPU, %;
  • IOPS;
  • RAM, %.

How the panel collects statistics

Raw statistics is kept in "/usr/local/mgr5/var/stat/raw" and is updated every 5 minutes. Every hour the control panel handles the raw statistics and delete it from the directory. The archive of the raw statistics is kept in "/usr/local/mgr5/var/stat/mon/mainstat/".

Per-minute statistics is kept during 5 days. Per-hour statistics is kept during one month and 3 days. Per-day statistics is kept during 2 years.

Incoming and outgoing traffic

The information is taken from /proc/net/dev.

"Receive Bytes" — incoming traffic.

"Transmit Bytes" — outgoing traffic.

The primary network interface of the cluster node is automatically selected as the interface.

CPU

The information is collected with the virNodeGetCPUStats of the libvirt library (the virsh nodecpustats command on the cluster node).

The CPU usage is calculated as follows:

(user+system) / (user+nice+system+iowait) * 100
user - percentage of CPU utilization that occurred while executing at the user level.
iowait — time spent by the CPU waiting for a IO operations to complete.
system - percentage of CPU utilization that occurred while executing at the system level.
idle - percentage of time that the CPU or CPUs were idle.

I/O operations

The information is taken from the /proc/diskstats file.

The usage is calculated as follows:

NumReads+NumWrites
NumReads — field 1 of the file /proc/diskstats (Field 1 -- # of reads issued).
NumWrites — filed  5 of the file /proc/diskstats (Field 5 -- # of writes completed).

The system calculates the data from all hard drives.

RAM

The information is collected with the virNodeGetMemoryStats function (the virsh nodememstats command).

The usage is calculated as follows:

MemUsed / MemTotal * 100
MemUsed = MemTotal - MemFree.
MemFree — free + cached.
MemTotal — the total field.

CPU

The information is taken from the results of the virNodeGetCPUStats function of the libvirt library (virsh nodecpustats on the cluster node).

CPU usage is calculated as follows: (user+system) / (user+nice+system+iowait) * 100, where

  • user - CPU utilization that occurred while executing at the user level.
  • iowait - time the CPU is idle, but waiting for an I/O to complete
  • system - CPU utilization that occurred while executing at the system level.
  • idle - time that the CPU were idle


I/O

The information is taken from the /proc/diskstats file It is calculated as: NumReads+NumWrites, where

  • NumReads - field 1 of the /proc/diskstats file (Field 1 -- # of reads issued)
  • NumWrites - field 5 of the /proc/diskstats file (Field 5 -- # of writes completed)


Only physcial hard drives are considered


RAM usage

The information is taken from the results of the virNodeGetMemoryStats function (the same ways as virsh nodememstats) It is calculated as: MemUsed / MemTotal * 100, where

  • MemUsed = MemTotal - MemFree,
  • MemFree - amount free + cached
  • MemTotal - field total