In neutron-lbaas many ORM relationships are configured to be lazy joined. This is causing slow api calls.
The problem is that a call to get a load balancer or a list of load balancers, will recursively get all listeners, pools and members belonging to those load balancer(s). If lazy wasn't used, the initial sql query would instantly retrieve all objects belonging to that load balancer, but as lazy joined is used, it will initially only get the load balancer data, and later have to do additional sql calls to get the remaining objects.
It's worth mentioning that even if cli calls only show limited data on a load balancer, internally the same call would return data containing listeners, pools and members. Pretty much negating any improvements lazy joined queries brings to the table.
Reviewed: https:/ /review. openstack. org/477698 /git.openstack. org/cgit/ openstack/ neutron- lbaas/commit/ ?id=7e35b183f92 5ad744cfcff5f40 5df131ad1d5f66
Committed: https:/
Submitter: Zuul
Branch: master
commit 7e35b183f925ad7 44cfcff5f405df1 31ad1d5f66
Author: Erik Olof Gunnar Andersson <email address hidden>
Date: Mon Jun 26 15:31:23 2017 -0700
Remove unnecessary lazy-loaded queries
This patch removes lazy-load queries to speed up database
operations when using neutron-lbaas.
Change-Id: I9d67f0966561ba aefb50ae97b943f f6593e194eb
Closes-Bug: #1706466