summary refs log tree commit diff
path: root/changelog.d/16840.misc
diff options
context:
space:
mode:
authorMathieu Velten <matmaul@gmail.com>2024-03-14 14:49:54 +0100
committerGitHub <noreply@github.com>2024-03-14 13:49:54 +0000
commitcb562d73aaa592c05b96672724ba296d02cee896 (patch)
treeeead02d23e1dbb580e0a7410894be84d02d70ddb /changelog.d/16840.misc
parentBump types-psycopg2 from 2.9.21.16 to 2.9.21.20240311 (#16995) (diff)
downloadsynapse-cb562d73aaa592c05b96672724ba296d02cee896.tar.xz
Improve lock performance when a lot of locks are waiting (#16840)
When a lot of locks are waiting for a single lock, notifying all locks
independently with `call_later` on each release is really costly and
incurs some kind of async contention, where the CPU is spinning a lot
for not much.

The included test is taking around 30s before the change, and 0.5s
after.

It was found following failing tests with
https://github.com/element-hq/synapse/pull/16827.
Diffstat (limited to 'changelog.d/16840.misc')
-rw-r--r--changelog.d/16840.misc1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/16840.misc b/changelog.d/16840.misc
new file mode 100644
index 0000000000..1175e6de71
--- /dev/null
+++ b/changelog.d/16840.misc
@@ -0,0 +1 @@
+Improve lock performance when a lot of locks are all waiting for a single lock to be released.