OpenStack Networking (Neutron)
Go to file
Felix Huettner d25c129ec2 Reduce lock contention on subnets
HINT: This isn't a clean backport, as we keep the subnet in-use field.
We can't backport the db update that would remove the field.

in [1] a lock was introduced with the goal of preventing subnets from
being deleted while ports are being created in them in parallel.
This was acheived by aquiring an exclusive lock on the row of the
subnet in the Subnet table when adding/modifying a port or deleting
the subnet.

However as this was a exclusive lock it also prevented concurrent port
modifications on the same subnet from happening. This can cause
performance issues on environment with large shared subnets (e.g. a
large external subnet).

To reduce the lock contention for this case we split the lock in two
parts:

* For normal port operations we will aquire a shared lock on the
  row of the subnet. This allows multiple such operations to happen in
  parallel.
* For deleting a subnet we will aquire an exclusive lock on the row of
  the subnet. This lock can not be aquired when there is any shared
  lock currently on the row.

With this we maintain the same locking level as before, but reduce the
amount of lock contention happening and thereby improve throughput.

The performance improvement can be measured using rally test [2].
(improving from 21 to 18 seconds).
Alternatively it can be tested using 250 parallel curl calls to create a
port in the same network. This improves from 113s to 42s.

[1]: https://review.opendev.org/c/openstack/neutron/+/713045
[2]: https://github.com/openstack/rally-openstack/blob/master/samples/tasks/scenarios/neutron/create-and-delete-ports.json

Closes-Bug: #2009055
Change-Id: I31b1a9c2f986f59fee0da265acebbd88d2f8e4f8
(cherry picked from commit c0af5b3b5e)
2023-09-27 11:14:54 +02:00
api-ref Fix some typos 2016-06-28 22:46:19 +02:00
devstack Make path for tcpdump release-specific 2023-03-28 12:53:33 +00:00
doc Merge "Make DB migration creating indexes in RBACs conditional" into stable/zed 2023-06-23 15:00:42 +00:00
etc Add missing osprofiler options 2023-02-25 20:54:50 +01:00
neutron Reduce lock contention on subnets 2023-09-27 11:14:54 +02:00
playbooks Limit tox version to <4 2022-12-23 20:37:01 +01:00
rally-jobs [ci] Fix several rally task arguments 2020-05-06 14:56:27 +03:00
releasenotes Merge "[neutron-api] remove leader_only for sb connection" into stable/zed 2023-09-12 17:08:02 +00:00
roles Switch fullstack/functional fips jobs to 9-stream 2023-09-14 05:20:42 +00:00
tools [OVN][Migration] Enable settings backup subnet for NFS clients 2023-06-06 17:54:22 +00:00
vagrant/ovn Fix local neutron folder path in ovn/sparse/Vagrantfile 2020-11-03 17:02:34 +01:00
zuul.d Switch fullstack/functional fips jobs to 9-stream 2023-09-14 05:20:42 +00:00
.coveragerc Cleanup coverage configuration 2016-10-17 17:06:19 +05:30
.gitignore Add etc/neutron/*.sample files to be ignored by git 2019-12-12 12:38:24 +01:00
.gitreview Update .gitreview for stable/zed 2022-09-16 10:01:45 +00:00
.mailmap Add mailmap entry 2014-05-16 13:40:04 -04:00
.pylintrc Remove "six" library 2020-07-28 16:55:52 +00:00
.stestr.conf Fix post gate hook to accommodate for new os-testr 2017-09-12 14:20:12 -06:00
bindep.txt Drop vzctl dep from bindep package list 2022-04-12 16:40:09 +05:30
CONTRIBUTING.rst [Community goal] Add contributor and PTL guide 2020-03-03 04:43:26 +01:00
HACKING.rst Follow up for replacing assertItemsEqual 2021-06-03 16:04:07 +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
plugin.spec Add OVN migration OSP 16.2 option 2021-01-24 17:18:55 +02:00
README.rst Doc: make the contributor guide more visible 2022-07-14 13:08:56 +02:00
requirements.txt `Session.autocommit` parameter is removed 2022-08-10 17:15:04 +02:00
setup.cfg Script to remove duplicated port bindings 2022-08-18 08:13:56 +00:00
setup.py Updated from global requirements 2017-03-04 11:19:58 +00:00
test-requirements.txt Follow-up: Move linters dependencies to tox.ini 2021-01-07 04:26:07 +09:00
TESTING.rst Drop lower-constraints.txt and its testing 2022-05-02 13:01:42 -05:00
tox.ini Limit tox version to <4 2022-12-23 20:37:01 +01:00

OpenStack Neutron

image

Neutron is an OpenStack project to provide "network connectivity as a service" between interface devices (e.g., vNICs) managed by other OpenStack services (e.g., Nova).

To learn more about neutron:

If you would like to contribute to Neutron, please read the file CONTRIBUTING.rst or see the Neutron contributor guide:

https://docs.openstack.org/neutron/latest/contributor/contributing.html

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