This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Apply limiter patch from Gitter import #14941
Copy link
Copy link
Closed
Labels
A-PerformancePerformance, both client-facing and admin-facingPerformance, both client-facing and admin-facingO-FrequentAffects or can be seen by most users regularly or impacts most users' first experienceAffects or can be seen by most users regularly or impacts most users' first experienceS-TolerableMinor significance, cosmetic issues, low or no impact to users.Minor significance, cosmetic issues, low or no impact to users.T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.New features, changes in functionality, improvements in performance, or user-facing enhancements.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Description
While importing historical Gitter archives into Gitter's homeserver we added a patch to improve performance:
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -502,7 +502,7 @@
# We arbitrarily limit concurrent event creation for a room to 5.
# This is to stop us from diverging history *too* much.
- self.limiter = Linearizer(max_count=5, name="room_event_creation_limit")
+ self.limiter = Linearizer(max_count=1, name="room_event_creation_limit")
self._bulk_push_rule_evaluator = hs.get_bulk_push_rule_evaluator()Digging some context out of internal issues:
The idea is to reduce the concurrency of event sends into rooms from 5 -> 1 in order to eliminate state resolution from occurring when sending bursts of events to a local room: matrix-org/synapse@
54c012c/synapse/handlers/message.py#L502-L504
For cross-linking, there was an old issue about doing this in #8612.
Unfortunately this changes was applied at the same time as a few other changes (disabling push and increasing the number of workers), so it is unclear how much impact this change had.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-PerformancePerformance, both client-facing and admin-facingPerformance, both client-facing and admin-facingO-FrequentAffects or can be seen by most users regularly or impacts most users' first experienceAffects or can be seen by most users regularly or impacts most users' first experienceS-TolerableMinor significance, cosmetic issues, low or no impact to users.Minor significance, cosmetic issues, low or no impact to users.T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.New features, changes in functionality, improvements in performance, or user-facing enhancements.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.