yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #05670
[Bug 1236704] Re: neutron API list calls taking lot of time
The code works perfect with we run under 400-500 ports. when we have more ports we see this issue. The response time is increased based on how may ports we list. for example response times
30s for 440 ports
40s for 600 ports
1m for 900 ports
1m30s for 1440 ports
we defiantly need to do some code optimization. when i do the SQL query
to get port list what been called from the code and the response is less
than 1s for 1440 ports.
SELECT ports.tenant_id AS ports_tenant_id, ports.id AS ports_id, ports.name AS ports_name, ports.network_id AS ports_network_id, ports.mac_address AS ports_mac_address, ports.admin_state_up AS ports_admin_state_up, ports.status AS ports_status, ports.device_id AS ports_device_id, ports.device_owner AS ports_device_owner
FROM ports.
** Changed in: neutron
Status: Invalid => Confirmed
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1236704
Title:
neutron API list calls taking lot of time
Status in OpenStack Neutron (virtual network service):
Confirmed
Status in neutron grizzly series:
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