the elapsed time is 49 seconds. Looking at the neutron server log file, 47 seconds were spent in the query in L110-L112, while the loop in L114-L117 took 2 seconds:
And we know from note #9 above that querying all the security groups directly with SQLAlchemy takes less than a second. This point to OVO code being the next bottleneck to tackle.
Added 3 LOG calls to https:/ /review. opendev. org/#/c/ 665566, 2 right before and after https:/ /github. com/openstack/ neutron/ blob/90c975292b dc1b9db97cf6ae4 0a6e6da9dbfc323 /neutron/ objects/ rbac_db. py#L110- L112 and one right before returning in L118. If I execute with a non admin user with only one security group:
openstack security group list
the elapsed time is 49 seconds. Looking at the neutron server log file, 47 seconds were spent in the query in L110-L112, while the loop in L114-L117 took 2 seconds:
Jun 17 14:45:56 allinone neutron- server[ 17621]: DEBUG neutron. objects. rbac_db [None req-5494f56d- 07fd-4753- aeaa-8f96acbefc fb demo demo] mlavalle {{(pid=17631) get_objects /opt/stack/ neutron/ neutron/ objects/ rbac_db. py:116} } server[ 17621]: DEBUG neutron. objects. rbac_db [None req-5494f56d- 07fd-4753- aeaa-8f96acbefc fb demo demo] mlavalle {{(pid=17631) get_objects /opt/stack/ neutron/ neutron/ objects/ rbac_db. py:121} } server[ 17621]: DEBUG neutron. objects. rbac_db [None req-5494f56d- 07fd-4753- aeaa-8f96acbefc fb demo demo] mlavalle {{(pid=17631) get_objects /opt/stack/ neutron/ neutron/ objects/ rbac_db. py:126} }
Jun 17 14:46:43 allinone neutron-
Jun 17 14:46:43 allinone neutron-
And we know from note #9 above that querying all the security groups directly with SQLAlchemy takes less than a second. This point to OVO code being the next bottleneck to tackle.