schedule_and_build_instances looks up host az for every instance even if using the same host
Bug #1785327 reported by
Matt Riedemann
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Matt Riedemann | ||
Pike |
Confirmed
|
Low
|
Unassigned | ||
Queens |
Confirmed
|
Low
|
Unassigned | ||
Rocky |
Fix Committed
|
Low
|
Matt Riedemann |
Bug Description
This is a simple performance optimization bug. When creating multiple servers, if they are in an affinity group they are going to be on the same host. Or if simply the scheduler configuration is such that instances are packed onto as few hosts as possible rather than spread, the scheduler could return several of the same hosts for the list of instances being scheduled. We iterate over the instances and their selected hosts and we lookup the az for each host in the loop which is a query to the aggregates table in the API DB. If we have >1 of the same host in the list, we could optimize this by simply caching the host=az mapping.
Changed in nova: | |
assignee: | nobody → Matt Riedemann (mriedem) |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/588665
Review: https:/