← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1359808] Re: extended_volumes slows down the nova instance list by 40..50%

 

This bug points to the number of queries made, you do not really need to
measure anything to see doing 4096 query in a loop is bad instead if
doing only one (or smaller group).

for id in ids:
 SELECT attr from table where ID=id;

vs.

 SELECT attr from table where ID in ids;


Mysql default max query size is 16777216 byte, so probably you can't specify significantly more than 256k uuid in one select statement. postgresql limit is bigger.


** Changed in: nova
       Status: Opinion => New

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

Title:
  extended_volumes slows down the nova instance list by 40..50%

Status in OpenStack Compute (Nova):
  New

Bug description:
  When listing ~4096 instances, the nova API (n-api) service has high CPU(100%)  usage because it does individual SELECTs,
  for every server's block_device_mapping. This adds ~20-25 sec to the response time.

  Please use more efficient way for getting the block_device_mapping,
  when multiple instance queried.

  This line initiating the individual select:
  https://github.com/openstack/nova/blob/4b414adce745c07fbf2003ec25a5e554e634c8b7/nova/api/openstack/compute/contrib/extended_volumes.py#L32

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


References