[openstack-dev] [nova] blueprint about multiple workers supported in nova-scheduler

Sylvain Bauza sbauza at redhat.com
Wed Mar 4 09:23:18 UTC 2015


Le 04/03/2015 04:51, Rui Chen a écrit :
> Hi all,
>
> I want to make it easy to launch a bunch of scheduler processes on a 
> host, multiple scheduler workers will make use of multiple processors 
> of host and enhance the performance of nova-scheduler.
>
> I had registered a blueprint and commit a patch to implement it.
> https://blueprints.launchpad.net/nova/+spec/scheduler-multiple-workers-support
>
> This patch had applied in our performance environment and pass some 
> test cases, like: concurrent booting multiple instances, currently we 
> didn't find inconsistent issue.
>
> IMO, nova-scheduler should been scaled horizontally on easily way, the 
> multiple workers should been supported as an out of box feature.
>
> Please feel free to discuss this feature, thanks.


As I said when reviewing your patch, I think the problem is not just 
making sure that the scheduler is thread-safe, it's more about how the 
Scheduler is accounting resources and providing a retry if those 
consumed resources are higher than what's available.

Here, the main problem is that two workers can actually consume two 
distinct resources on the same HostState object. In that case, the 
HostState object is decremented by the number of taken resources (modulo 
what means a resource which is not an Integer...) for both, but nowhere 
in that section, it does check that it overrides the resource usage. As 
I said, it's not just about decorating a semaphore, it's more about 
rethinking how the Scheduler is managing its resources.


That's why I'm -1 on your patch until [1] gets merged. Once this BP will 
be implemented, we will have a set of classes for managing heterogeneous 
types of resouces and consume them, so it would be quite easy to provide 
a check against them in the consume_from_instance() method.

-Sylvain

[1] 
http://specs.openstack.org/openstack/nova-specs/specs/kilo/approved/resource-objects.html
>
> Best Regards
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150304/166c3a29/attachment.html>


More information about the OpenStack-dev mailing list