excessive SQL query fanout on port list with many trunk ports
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
New
|
Undecided
|
Nate Johnston |
Bug Description
when doing something like
openstack port list --project=$uuid
in a project that has many (~500) trunk ports defined, the api request takes a very long
tiem to complete (> 60s) and returns an excessively large json document.
this is due to
neutron/
def _extend_
"""Add trunk details to a port."""
if port_db.trunk_port:
for x in port_db.
}
ports = core_plugin.
for port in ports:
return port_res
which is doing a SQL query (via core_plugin.
This trunk_details section is not actually shown by the openstack client, so it does so with no good reason. (it might be in --long output, didn't check).
It isn't entirely clear to me how to solve this, but I would suggest that we skip the _extend_
Another way would be to add a flag to skip those to the api and make sure Nova (which triggers those listings) is not using those detailed lookups (it entirely ignores the result anyway).
Changed in neutron: | |
assignee: | nobody → Nate Johnston (nate-johnston) |
Hi, thanks for the bug report. suggestions: which version on neutron are you using? /wiki.openstack .org/wiki/ Neutron/ TrunkPort# Performance_ .2F_Scaling
Some questions/
There's some original measurements about trunkports: https:/
It can be useful to read.
Generally trunkports has scaling issues if you have many subports per trunks, but I think your case is not this one.