Comment 2 for bug 1816086

Revision history for this message
Eric Fried (efried) wrote :

Talked this over with Belmiro in IRC [1].

The bulk of the time is apparently *not* spent talking to placement, but rather locally in the last loop of update_from_provider_tree [2]. Upon inspection, this loop is O(N) just to *find* each provider in the ProviderTree, making the overall loop O(N^2). The proposed patch [3] makes finding a single provider O(1), reducing the overall to O(N).

Let's see if this helps.

[1] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2019-02-15.log.html#t2019-02-15T15:58:13 (interleaved conversation; highlight 'belmoreira' to find the relevant bits)
[2] https://github.com/openstack/nova/blob/880327cc31fea7328d23355730d5458f3b74662b/nova/scheduler/client/report.py#L1439-L1446
[3] https://review.openstack.org/637225