OpenStack Networking (Neutron)
Go to file
Kevin Benton a802b382d3 Use subqueries for rbac_entries and subnets<->network
Loading subnets as part of the networks list and networks
as part of the subnets list appears to have a significant
impact when the network has tags and the subnets have
extra routes entries. This is even further compounded by
the network having rbac entries (likely due to the subnet
inheriting the RBAC entries of the network with the custom
join condition in the model).

This patch converts rbac_entries on both subnet and network
to use a subquery and converts the network and subnets
relationships on the subnet and network models (respectively)
to use subqueries as well.

On my dev environment after running the script in the report,
a network list took 5 minutes. Converting just the rbac_entries
or just the network/subnet relationship to subqueries reduced it
to 3-5 seconds. Converting both (as this patch does), reduces it
back down to a couple of hundred milliseconds (normal perf of my
development env with the current network count).

Subqueries will just cost us a constant number of queries and
won't scale up with result count so this should not impact scalability
in any way.

None of these fields are queryable from the API, so we don't need
to worry about breaking queries against the models.

Partial-Bug: #1649317
Change-Id: Ic1947e3d78d58a79b21344b10cb7ab0e573e419f
2016-12-19 18:33:43 +00:00
api-ref Fix some typos 2016-06-28 22:46:19 +02:00
bin XenAPI: add support for conntrack with XenServer 2016-09-23 02:34:25 +00:00
devstack Don't compile OVS kernel modules for functional job 2016-12-01 11:28:17 -05:00
doc Merge "Proposing tidwellr and njohnston as service layer go-to contacts" 2016-12-19 10:38:46 +00:00
etc Merge "iptables: fail to start ovs/linuxbridge agents on missing sysctl knobs" 2016-10-21 02:14:02 +00:00
neutron Use subqueries for rbac_entries and subnets<->network 2016-12-19 18:33:43 +00:00
rally-jobs rally trunk port list 2016-12-10 06:15:34 -08:00
releasenotes Merge "Fix DHCP Port Creation on Service Subnets" 2016-12-19 11:35:14 +00:00
tools Merge "Remove duplicated tool" 2016-11-11 22:26:52 +00:00
.coveragerc Cleanup coverage configuration 2016-10-17 17:06:19 +05:30
.gitignore Automatically generate neutron core configuration files 2015-11-27 15:22:59 +00:00
.gitreview Fix .gitreview to not point at a branch 2015-08-17 13:51:51 -06:00
.mailmap Add mailmap entry 2014-05-16 13:40:04 -04:00
.pylintrc Remove last vestiges of oslo-incubator 2016-11-04 20:49:13 -04:00
.testr.conf Allow more time for DB migration tests 2016-09-21 20:54:41 -04:00
CONTRIBUTING.rst Make crystal clear how to contribute/approach the neutron community 2016-10-28 11:49:44 -07:00
HACKING.rst Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2016-11-22 02:15:19 +00:00
LICENSE Adding Apache Version 2.0 license file. This is the official license agreement under which Quantum code is available to 2011-08-08 12:31:04 -07:00
README.rst Show team and repo badges on README 2016-11-25 15:35:21 +01:00
TESTING.rst Fix docs headers 2016-11-30 11:54:34 -08:00
babel.cfg Use babel to generate translation file 2013-01-24 00:20:32 +08:00
bindep.txt Fix periodic jobs: Add databases to bindep.txt 2016-10-09 06:31:00 +02:00
requirements.txt Updated from global requirements 2016-12-15 03:50:28 +00:00
run_tests.sh Deprecate run_tests.sh 2016-11-08 03:50:20 +00:00
setup.cfg Remove legacy oslo.messaging.notify.drivers 2016-11-23 16:07:57 +00:00
setup.py Updated from global requirements 2015-09-21 18:56:49 +00:00
test-requirements.txt Updated from global requirements 2016-11-22 13:56:13 +00:00
tox.ini Switch to new hacking 0.12 2016-11-08 03:36:00 +00:00

README.rst

Team and repository tags

image

Welcome!

To learn more about neutron:

Get in touch via email. Use [Neutron] in your subject.

To learn how to contribute:

CONTRIBUTING.rst