← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1785327] [NEW] schedule_and_build_instances looks up host az for every instance even if using the same host

 

Public bug reported:

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.

https://github.com/openstack/nova/blob/4c37ff72e5446c835a48d569dd5a1416fcd36c71/nova/conductor/manager.py#L1263

** Affects: nova
     Importance: Low
     Assignee: Matt Riedemann (mriedem)
         Status: Triaged

** Affects: nova/pike
     Importance: Low
         Status: Confirmed

** Affects: nova/queens
     Importance: Low
         Status: Confirmed


** Tags: conductor performance

** Also affects: nova/pike
   Importance: Undecided
       Status: New

** Also affects: nova/queens
   Importance: Undecided
       Status: New

** Changed in: nova/pike
       Status: New => Confirmed

** Changed in: nova/queens
       Status: New => Confirmed

** Changed in: nova/queens
   Importance: Undecided => Low

** Changed in: nova/pike
   Importance: Undecided => Low

** Changed in: nova
     Assignee: (unassigned) => Matt Riedemann (mriedem)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1785327

Title:
  schedule_and_build_instances looks up host az for every instance even
  if using the same host

Status in OpenStack Compute (nova):
  Triaged
Status in OpenStack Compute (nova) pike series:
  Confirmed
Status in OpenStack Compute (nova) queens series:
  Confirmed

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.

  https://github.com/openstack/nova/blob/4c37ff72e5446c835a48d569dd5a1416fcd36c71/nova/conductor/manager.py#L1263

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1785327/+subscriptions


Follow ups