Nova Compute Load Averages
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". The method asks 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 the following information in a dictionary. The load average will be in a tuple for the last 1, 5 and 15 minutes.
{ "time": "15:57:03", "up": "5:22", "users": 3, "loadavg": (0.2, 0.55, 0.01) }
Usage
- V2 REST API - no changes. This will ensure that the code is backward compatible and users that have applications written against the V2 API will continue to work. In this case only the raw data will be returned.
- V3 REST API- the data defined above will be returned
The blueprint can be seen at: https://blueprints.launchpad.net/nova/+spec/compute-loadavg