VMmanager OVZ cluster resource usage

From ISPWiki
Jump to: navigation, search

Cluster resource usage statistics collects the following data :

  • incoming/outgoing bandwidth, GiB
  • CPU, %
  • system load average
  • RAM, %
  • I/O operations

Statistical information is collected once in 5 minutes. It can be collected per 5 minutes, 1 hour and 1 day. You can select a desired period to view resource consumption by your container.

Incoming/outgoing bandwidth

The information is taken from the /proc/net/dev file.
The Receive Bytes field is incoming bandwidth, Transmit Bytes is outgoing. The main interface of a cluster node is automatically selected.

CPU

The information is taken from the /proc/stat file

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

  • user - CPU utilization while executing at the user level
  • nice - CPU utilization while executing at the user level with nice priority (nice process)
  • system - CPU utilization while executing at the system level
  • idle - idle time

Input/output operations

The information is taken from the /proc/diskstats file

It is calculated as follows 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)

information from all hard drives is calculated.

RAM usage

The information is taken from the /proc/meminfo file
It is calculated as follows MemUsed / MemTotal * 100, where
MemUsed = MemTotal - MemFree,
MemTotal, MemFree corresponding fields of the /proc/meminfo file

system load average

The information is taken from the /proc/loadavg file
VMmanager OVZanalyses the second figure (average value over 5 minutes) of the file's output.