[openstack-dev] [Nova] bp proposal: filter based on the load averages of the host
sahid
sahid.ferdjaoui at cloudwatt.com
Fri Feb 14 15:29:37 UTC 2014
Greetings,
I would like to add a new filter based on the load averages.
This filter will use the command uptime and will provides an option to choice a
period between 1, 5, and 15 minutes and an option to choice the max load
average (a float between 0 and 1).
Why:
During a scheduling it could be useful to exclude a host that have a too
heavy load and the command uptime (available in all linux system)
can return a load average of the system in different periods.
About the implementation:
Currently 'all' drivers (libvirt, xenapi, vmware) supports a method
get_host_uptime that returns the output of the command 'uptime'. We have to add
in compute/stats.py a new method calculate_loadavg() that returns based on the
output of driver.get_host_uptime() from compute/ressource_tracker.py a well
formatted tuple of load averages for each periods. We also need to update
api/openstack/compute/contrib/hypervisors.py to take care of this new
field.
The implementation will be divided in several parts:
* Add to host_manager the possibility to get the loads_averages
* Implement the filter based on this new property
* Implement the filter with a per-aggregate configuration
The blueprint: https://blueprints.launchpad.net/nova/+spec/filter-based-uptime
I will be happy to get any comments about this filter, perharps it is not implemented
yet because of something I didn't see or my thinking of the implementation is wrong.
PS: I have checked metrics and cpu_resource but It does not get an averages of the
system load or perhaps I have not understand all.
Thanks a lot,
s.
More information about the OpenStack-dev
mailing list