[openstack-dev] [Nova] bp proposal: filter based on the load averages of the host

Eric Brown browne at vmware.com
Fri Feb 14 15:44:00 UTC 2014


This will probably not work for the vmware driver since it does not return a standard uptime string.  Here's an example of what you would get:

$ nova hypervisor-uptime 1
+---------------------+--------------------------------------------+
| Property            | Value                                      |
+---------------------+--------------------------------------------+
| hypervisor_hostname | domain-c7(OpenStackCluster)                |
| id                  | 1                                          |
| uptime              | Please refer to 10.0.7.1 for the uptime |
+---------------------+--------------------------------------------+


On Feb 14, 2014, at 10:29 AM, sahid <sahid.ferdjaoui at cloudwatt.com> wrote:

> 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://urldefense.proofpoint.com/v1/url?u=https://blueprints.launchpad.net/nova/%2Bspec/filter-based-uptime&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=2CQc966BQ6s3Cdd6nQ79uvWP17nF9g%2FX4m3XppGg1xQ%3D%0A&m=%2F2SxxIStRB5OioDQormYLfKPx3nAoxbjqTWRezbId4U%3D%0A&s=1c937276a79b45279a009231915f5cac684c565b7b6b1e1cd40c659404f83a03
> 
> 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.
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> https://urldefense.proofpoint.com/v1/url?u=http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=2CQc966BQ6s3Cdd6nQ79uvWP17nF9g%2FX4m3XppGg1xQ%3D%0A&m=%2F2SxxIStRB5OioDQormYLfKPx3nAoxbjqTWRezbId4U%3D%0A&s=78d752c782f43b4e3ae29988f60c7cf1dc743190bddd55e732c73c378fb12e3d

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140214/537d95a1/attachment.html>


More information about the OpenStack-dev mailing list