Difference between revisions of "Nova Compute Load Averages"
(→Overview) |
(→Overview) |
||
| Line 2: | Line 2: | ||
The system load averages for the past 1, 5 and 15 minutes are returns by the command "uptime" on linux based system. The load averages are not normalized for the number of CPUs in a system, so a load average of 1 means a single CPU system is loaded all the time while on a 4 CPU system it means it was idle 75% of the time. | The system load averages for the past 1, 5 and 15 minutes are returns by the command "uptime" on linux based system. The load averages are not normalized for the number of CPUs in a system, so a load average of 1 means a single CPU system is loaded all the time while on a 4 CPU system it means it was idle 75% of the time. | ||
== Overview == | == Overview == | ||
| − | Currently the base classe `virt.driver.ComputeDriver` defines a method "get_host_uptime". | + | Currently the base classe `virt.driver.ComputeDriver` defines a method "get_host_uptime". This method ask the driver to call the command uptime but does not define a correct output format. |
=== libvirt === | === libvirt === | ||
Revision as of 13:54, 17 February 2014
Contents
Introduction
The system load averages for the past 1, 5 and 15 minutes are returns by the command "uptime" on linux based system. The load averages are not normalized for the number of CPUs in a system, so a load average of 1 means a single CPU system is loaded all the time while on a 4 CPU system it means it was idle 75% of the time.
Overview
Currently the base classe `virt.driver.ComputeDriver` defines a method "get_host_uptime". This method ask the driver to call the command uptime but does not define a correct output format.
libvirt
get_host_uptime: 13:37:30 up 7 days, 4:29, 19 users, load average: 0.04, 0.04, 0.0
vmware
get_host_uptime: Please refer to {HOST_IP} for the uptime
xenapi
get_host_uptime: 13:37:30 up 7 days, 4:29, 19 users, load average: 0.04, 0.04, 0.0
Proposal
The proposal is to have the drivers returns a tuple of the 1, 5 and 15 minutes based system load averages normalized by the number of CPUs in the system. So a load average of 1 means the system is loaded all the time even if there is 1 or n CPUs .
Implementation Details
An additional method `get_host_loadavg` will be added to `virt.driver.ComputeDriver`. This method will returns a tuple of the last 1, 5, and 15minutes of the system load average normalized by the number of CPUs by invoking the standard command `uptime`