yes I want to use the load average because it is based on more information than the cpu utilization. May be instead of to add a new field to hypervisor status I can create a new monitor or update the exiting one.
----- Original Message ----- From: "yunhong jiang" <yunhong.ji...@linux.intel.com> To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev@lists.openstack.org> Sent: Saturday, February 15, 2014 12:54:52 AM Subject: Re: [openstack-dev] [Nova] bp proposal: filter based on the load averages of the host On Fri, 2014-02-14 at 15:29 +0000, sahid 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://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. > > _______________________________________________ > OpenStack-dev mailing list > OpenStack-dev@lists.openstack.org > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev I think load average has more than CPU, you need consider like I/O usage, or even other metrics. Maybe you can have a look at the https://blueprints.launchpad.net/nova/+spec/utilization-aware-scheduling ? Also IMHO the policy of "exclude a host that have a too heavy load" is not so clean, would it be better to keep the usage as a scheduler weight? Thanks --jyh _______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev _______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev