-
- Downloads
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.
Showing
- changelog.d/16840.misc 1 addition, 0 deletionschangelog.d/16840.misc
- synapse/handlers/worker_lock.py 9 additions, 6 deletionssynapse/handlers/worker_lock.py
- tests/handlers/test_worker_lock.py 23 additions, 0 deletionstests/handlers/test_worker_lock.py
- tests/utils.py 41 additions, 1 deletiontests/utils.py
Loading
Please register or sign in to comment