← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1719460] Re: (perf) Unnecessarily joining instance.services when listing instances regardless of microversion

 

Reviewed:  https://review.openstack.org/507854
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a0b4116ed68cb71a9a74fee616b5036f5fda4dd2
Submitter: Zuul
Branch:    master

commit a0b4116ed68cb71a9a74fee616b5036f5fda4dd2
Author: Andrey Volkov <avolkov@xxxxxxxxxxxx>
Date:   Wed Sep 27 09:40:22 2017 +0300

    List instances performace optimization
    
    Join service table for microversion starting 2.16 only
    so only include service from 2.16 version.
    
    Co-Authored-By: jichenjc <jichenjc@xxxxxxxxxx>
    
    Closes-Bug: 1719460
    
    Change-Id: I6c57fa013ee8f6d064fc747906e1234a0aa3e8c2


** Changed in: nova
       Status: In Progress => Fix Released

-- 
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/1719460

Title:
  (perf) Unnecessarily joining instance.services when listing instances
  regardless of microversion

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

Bug description:
  Microversion 2.16 adds the ability to show the host status of an
  instance when listing servers with details or showing a single
  server's details. By default that is only shown for an admin.

  Change https://review.openstack.org/#/c/355558/ helped improve the
  performance for this by avoiding lazy-loading the instance.services
  column by doing the join in the DB API when querying the instances
  from the database.

  However, that check is not based on version 2.16, like the 2.26 tags
  check below it.

  This means that we are unnecessarily joining with the services table
  when querying instances with microversions < 2.16, which happens, for
  example, by default in the openstack CLI which uses microversion 2.1.

  We arguably should make this also conditional on policy so we don't
  join for non-admins by default, but that's less of an issue probably
  as non-admins probably aren't listing thousands of instances from the
  deployment like an admin would.

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


References