Comment 2 for bug 1236704

Revision history for this message
Ravi Chunduru (ravivsn) wrote : Re: [Bug 1236704] Re: neutron API calls taking lot of time

Hi Aaron,
  We are having production deployment with openstack in Grizzly. So the
improvements must be backported if any.
From my observations - it is not DB related but the additional policy
checks done on references to other resources in the response.

Thanks,
-Ravi.

On Mon, Oct 7, 2013 at 11:04 PM, Aaron Rosen <email address hidden> wrote:

> We actually made a number of db related performance improvements in
> havana. Any chance you can try with the havana code base? I've run port-
> list with 100's of ports which return in a few seconds.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1236704
>
> Title:
> neutron API calls taking lot of time
>
> Status in OpenStack Neutron (virtual network service):
> New
>
> Bug description:
> Neutron API calls are taking lot of time compared to nova or keystone
> service APIs.
> In our deployment - its considerable that we had to increase
> neutron_url_timeout in nova.conf to 120s. Required for nova list to
> succeed.
>
> In our analysis we found that DB access was quick enough but
> considerable time spent in the following code
>
>
> https://github.com/openstack/neutron/blob/master/neutron/api/v2/base.py#L236
>
> Here is the code for reference
> if do_authz:
> # FIXME(salvatore-orlando): obj_getter might return
> references to
> # other resources. Must check authZ on them too.
> # Omit items from list that should not be visible
> obj_list = [obj for obj in obj_list
> if policy.check(request.context,
> self._plugin_handlers[self.SHOW],
> obj,
> plugin=self._plugin)]
>
> There is a clear comment from Salvatore to fix the above code.
>
> # FIXME(salvatore-orlando): obj_getter might return references to
> # other resources. Must check authZ on them too.
> # Omit items from list that should not be visible
>
> Need to fix it or improve the neutron API response time for list calls.
> Commenting the above code improved in my devstack setup for port list to
> 6 seconds against 18 seconds for about 500 ports.
> This issue is reproduced in Grizzly and I am sure it is an issue for
> Havana too.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/neutron/+bug/1236704/+subscriptions
>

--
Ravi