Difference between revisions of "Vestat"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(category)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
The '''/proc/vz/vestat''' file contains statistics for VE CPU usage.  
 
The '''/proc/vz/vestat''' file contains statistics for VE CPU usage.  
  
The ''guessed'' content (may the Gods - blessed thy fingers - acknowledge or reject my humble info here):
+
The ''guessed'' content (may the Gods - blessed thy fingers - acknowledge or reject my humble info here) ( See http://forum.openvz.org/index.php?t=msg&goto=2687 (OpenVZ developer talks /proc/vz/vestat) for more info):
  
 
* '''VEID''': The VE ID, obviously.
 
* '''VEID''': The VE ID, obviously.
 
* '''user, nice, system, uptime''': usage in [[jiffy|jiffies]]. These are the equivalents of <code>/proc/stat</code>, but there is no ''idle'' because it cannot be measured this way.
 
* '''user, nice, system, uptime''': usage in [[jiffy|jiffies]]. These are the equivalents of <code>/proc/stat</code>, but there is no ''idle'' because it cannot be measured this way.
* '''idle, strv, uptime, used''': usage in [[cycle|cycles]]. idle and uptime are obvious, strv isn't used, and used is the used cycles by VE on all CPUs.
+
* '''idle, strv, uptime, used''': usage in [[cycle|cycles]]. ''idle'' and ''uptime'' are obvious, ''strv'' isn't used, and ''used'' is the used cycles by VE on all CPUs.
* '''maxlat, totlat, numsched''': latency statistics in ''cycles''. maxlat is max latency in cycles meaning how long VE process has to wait before it actually got CPU time; totlat/numsched gives average scheduling latency. '''These do not seem work in OpenVZ, only in Virtuozzo.'''
+
* '''maxlat, totlat, numsched''': latency statistics in cycles. ''maxlat'' is max latency in cycles meaning how long VE process has to wait before it actually got CPU time; ''totlat/numsched'' gives average scheduling latency. '''These do not seem work in OpenVZ, only in Virtuozzo.'''
  
 
== Measure conversions ==
 
== Measure conversions ==
Line 14: Line 14:
  
 
Using cycles:
 
Using cycles:
*seconds = ''measurement'' / cycles_per_jiffy / jiffies_per_seconds.
+
*seconds = ''measurement'' / frequency_of_your_cpu
  
 
Variables:
 
Variables:
* ''jiffies_per_second'' = 1000 '''(unless you have changed that in kernel config?)'''
+
* ''jiffies_per_second'' = 1000 '''(more often ''100'', unless you have changed that in kernel config, check CONFIG_HZ= in kernel .config or /proc/config.gz)'''
 
* ''cycles_per_jiffy'' = ''frequency_of_your_cpu'' / ''jiffies_per_second''
 
* ''cycles_per_jiffy'' = ''frequency_of_your_cpu'' / ''jiffies_per_second''
* ''frequency_of_your_cpu'' (in Hz) can be read from /proc/meminfo, as:
+
* ''frequency_of_your_cpu'' (in Hz) can be read from /proc/cpuinfo, as:
** <code>cpu MHz : ''frequency_of_your_cpu''</code>
+
** <code>cpu MHz : ''megahertz''</code>, and thus ''frequency_of_your_cpu'' = ''megahertz'' * 1048576 (for multiCPU machines this is based on the speed of one cpu only)

Latest revision as of 12:35, 14 January 2010

The /proc/vz/vestat file contains statistics for VE CPU usage.

The guessed content (may the Gods - blessed thy fingers - acknowledge or reject my humble info here) ( See http://forum.openvz.org/index.php?t=msg&goto=2687 (OpenVZ developer talks /proc/vz/vestat) for more info):

  • VEID: The VE ID, obviously.
  • user, nice, system, uptime: usage in jiffies. These are the equivalents of /proc/stat, but there is no idle because it cannot be measured this way.
  • idle, strv, uptime, used: usage in cycles. idle and uptime are obvious, strv isn't used, and used is the used cycles by VE on all CPUs.
  • maxlat, totlat, numsched: latency statistics in cycles. maxlat is max latency in cycles meaning how long VE process has to wait before it actually got CPU time; totlat/numsched gives average scheduling latency. These do not seem work in OpenVZ, only in Virtuozzo.

Measure conversions[edit]

Using jiffies:

  • seconds = measurement / jiffies_per_seconds

Using cycles:

  • seconds = measurement / frequency_of_your_cpu

Variables:

  • jiffies_per_second = 1000 (more often 100, unless you have changed that in kernel config, check CONFIG_HZ= in kernel .config or /proc/config.gz)
  • cycles_per_jiffy = frequency_of_your_cpu / jiffies_per_second
  • frequency_of_your_cpu (in Hz) can be read from /proc/cpuinfo, as:
    • cpu MHz : megahertz, and thus frequency_of_your_cpu = megahertz * 1048576 (for multiCPU machines this is based on the speed of one cpu only)