[DB] Neutron quota request implementation can end in a lock status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Wishlist
|
Rodolfo Alonso |
Bug Description
Neutron quota request implementation can end in a DB lock status. The quota is assigned per resource (port, network, security group, etc.) and per project. When a request is done, a DB lock is set for this (resource, project) tuple. This lock in the DB engine to lock this tuple in all workers of all API servers.
That implies there is a a bottleneck when a high number of requests arrive to the API at the same time. If the number of requests exceeds the number of resources processes, the DB locked transactions will increase indefinitely. This can be seen in the DB executing:
$ mysql -e "show processlist;" | egrep "reservations|
The query used by Neutron to lock this (resource, project) tuple is:
UPDATE quotausages SET dirty=1 WHERE quotausages.
AND quotausages.
An improved quota system should be implemented that allow parallel resource request and avoids this DB lock status.
NOTE: please check [2][3]. "Neutron does not enforce quotas in such a way that a quota violation like this could never occur". That means even with this restrictive DB locking method, resource overcommit is possible.
[1]https:/
[2]https:/
[3]https:/
Bugzilla: https:/
Changed in neutron: | |
importance: | Undecided → Wishlist |
description: | updated |
Changed in neutron: | |
status: | New → Confirmed |
tags: | added: db |
Changed in neutron: | |
assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |
Open discussion in [1]. In [2] I propose an alternative quota system that drops the concept of resource "locks" and relays only on the DB current information.
I'll propose this as a RFE in the next Neutron meeting.
[1]https:/ /bugzilla. redhat. com/show_ bug.cgi? id=1955661 /bugzilla. redhat. com/show_ bug.cgi? id=1955661# c2
[2]https:/