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).
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/%23opensta ck-nova. 2019-02- 15.log. html#t2019- 02-15T15: 58:13 (interleaved conversation; highlight 'belmoreira' to find the relevant bits) /github. com/openstack/ nova/blob/ 880327cc31fea73 28d23355730d545 8f3b74662b/ nova/scheduler/ client/ report. py#L1439- L1446 /review. openstack. org/637225
[2] https:/
[3] https:/