[openstack-dev] Potential enhancement to filter scheduler
Day, Phil
philip.day at hp.com
Thu Jan 17 10:36:27 UTC 2013
Hi Chris,
I was thinking that providing we pick M *distinct* hosts from the top N (where M is less than N) then there is no need to even re-filter the ones that are picked, as each will be only getting one instance and its already been filtered for that.
The core of the thinking here is that although they are in a ranked order, all of the top N hosts are equally optimal to run an instance - so there's no advantage in picking any host more than once.
The outline of what I was thinking is something like this:
N = Number of hosts we want to consider from the top of the weighted list
M = Maximum number of hosts we want to schedule in any one pass (doesn't make sense for this to be more than N)
V = Number of instances we still need to schedule (decreases on each pass)
While still instances to schedule:
- Filter
- Weight
- Number of host to pick this round = min (V, M, N, length of weighted hosts)
- Pick this many distinct hosts from the first N on the weighted list (each will get one instance)
If we still haven't got enough hosts for all the VMs, go back though the filter and weight functions again (probably best to do this for all hosts rather than just those selected in case another scheduler has also been busy - I think that's what the current code does, right ?)
If M=1 and N=1 then we have the current behaviour
Keeping M and N separate allows people more flexibility in configuration, but we could just use the same value for both and keep it simpler.
Cheers,
Phil
From: Chris Behrens [mailto:cbehrens at codestud.com]
Sent: 16 January 2013 23:33
To: OpenStack Development Mailing List
Subject: Re: [openstack-dev] Potential enhancement to filter scheduler
On Jan 16, 2013, at 11:22 AM, "Day, Phil" <philip.day at hp.com<mailto:philip.day at hp.com>> wrote:
Hi Folks,
In working with the Filter Scheduler we've come with a couple of ideas on enhancement to make the final host selection stage configurable. Whilst its sometimes fine to just pick the first host from the list of weighted hosts, the more general case is that I'd like to be able to have the scheduler pick one of the first N hosts on the weighted list. The specific use cases that I have in mind are:
i) On a large system there is very rarely a single ideal / optimal host for a particular instance to be placed on. In practice any of the N most
[...]
Hey cool, I actually have a patch for picking at random from the top N hosts as well, but I haven't gotten around to proposing it. :) Consider that as support for the idea. ;) Not sure I like the implementation, but I can comment on that in the review.
ii) The second idea is that when creating M instances in one request we could randomly select M hosts out of the first N hosts in the list (since these have all been filtered as being suitable) which would save having to iterate through the filter / weighting functions for each successive instance. Haven't done any coding for this yet, but would appreciate thoughts.
You don't need to re-filter the whole list of hosts. However, you do need to re-filter the host that has been chosen on every pass. It may have only been suitable for 1 instance.
- Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130117/419a04cb/attachment.html>
More information about the OpenStack-dev
mailing list