← Back to team overview

openstack team mailing list archive

Re: cinder api list volumes very slow and inefficient.

 

On 09/07/2013, at 2:53 AM, John Griffith <john.griffith@xxxxxxxxxxxxx> wrote:

> 
> 
> 
> On Sun, Jul 7, 2013 at 5:43 PM, Sam Morrison <sorrison@xxxxxxxxx> wrote:
> Hi,
> 
> I'm wondering if anyone is using cinder and is having issue with the list volumes API call.
> 
> We have a grizzly install and we're at about 160 active volumes in cinder at the moment.
> 
> To do "cinder list" with a tenant that has about 140 volumes it takes about 6 seconds.
> API calls on a specific volume are done in about 0.1 seconds so I'm happy with the API servers, it's the code I'm worried about.
> 
> Doing a "cinder list --all-tenants" as an admin it takes about 20 seconds.
> 
> Looking at the code it seems as an admin it will iterate over every volume 3 times and do a db requests on each volume.
> As a normal user it iterates over every volume once.
> 
> The for loops are for adding glance image information and as an admin it also adds host and tenant information which is in the same table so it's a bit strange that it's doing more DB calls.
> 
> Does anyone use cinder with more that just a couple of active volumes and if so how do they when requests are so slow?
> We have 36 cinder-api servers handling requests and they aren't under significant load. Also our DB cluster is handling things fine.
> 
> Cheers,
> Sam
> 
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>  
> Hi Sam,
> Definitely some things in this area that cause problems at scale, I'm not sure exactly where you're looking at in terms of the loops?
> 
> We did recently submit a bug fix [1] related to some of this, but I don't think it covers the case you're describing and it has NOT been backported to Grizzly.
> 
> If you'd like to point me specifically to the loops your describing I'm happy to take a look and see if we can fix this up.
> 
> Thanks,
> John
> 
> [1] http://tinyurl.com/jwgpxpr
> 
> 

Hi John,

We opened a bug about this: 

https://bugs.launchpad.net/cinder/+bug/1197612

Cheers,
Sam




References