matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.82k stars 2.13k forks source link

Reduce task concurrency #16656

Closed erikjohnston closed 11 months ago

erikjohnston commented 11 months ago

Most background tasks don't have any form of limiting on resource usage, so running ten of them at a time could be problematic for DB load. The deleting device messages task does have limiting, but we can make that less aggressive now that a) the queries are more efficient, and b) we are doing fewer in parallel.

erikjohnston commented 11 months ago

I believe I've said this before, but it might make sense to adapt what we do with background schema updates for background tasks in general?

Indeed.