difference in execution time between admin/non-admin call
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Triaged
|
Medium
|
Unassigned |
Bug Description
Part of https:/
Another interesting thing is difference in execution time between admin/non-admin call:
(openstack) dmitriy@6BT6XT2:~$ . Documents/
(openstack) dmitriy@6BT6XT2:~$ time openstack port list --project <project> | wc -l
2142
real 0m5,401s
user 0m1,565s
sys 0m0,086s
(openstack) dmitriy@6BT6XT2:~$ . Documents/
(openstack) dmitriy@6BT6XT2:~$ time openstack port list | wc -l
2142
real 2m38,101s
user 0m1,626s
sys 0m0,083s
(openstack) dmitriy@6BT6XT2:~$
(openstack) dmitriy@6BT6XT2:~$ time openstack port list --project <project> | wc -l
2142
real 1m17,029s
user 0m1,541s
sys 0m0,085s
(openstack) dmitriy@6BT6XT2:~$
So basically if provide tenant_id to query, it will be execute twice as fast.But it won't look through networks owned by tenant (which would kind of explain difference in speed).
Environment:
Neutron SHA: 97180b01837638b
Backend: ovs
OS: Ubuntu 20.04
Mariadb: 10.6.5
SQLalchemy: 1.4.23
Backend: openvswitch
Plugins: router vpnaas metering neutron_
Changed in neutron: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in neutron: | |
status: | Confirmed → Incomplete |
Changed in neutron: | |
status: | Expired → Triaged |
Hi:
I'm comparing both queries and are very similar [1]. The only difference is in the WHERE clause, where the query with the project ID adds an unnecessary check:
WHERE
(ports. project_ id = '8f5410f0e28148 ddb03f39028f2c9 097' ddb03f39028f2c9 097' 8ddb03f39028f2c 9097'))
OR ports.network_id = networks.id
AND networks.project_id = '8f5410f0e28148
AND ports.project_id IN ('8f5410f0e2814
I'm checking with different projects and number of ports but I don't see any difference in the response time of the server.
Regards.
[1]https:/ /paste. opendev. org/show/ b0QFVpuE8JpJ6z3 TVVR4/