-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Investigate if uvloop
with asyncioreactor
gives some speedboosts
#10366
Comments
This is interesting, and compatible with Python 3.5+. A conditional would be necessary for the old versions of Twisted we support. While useful, I don't know whether the event loop is currently Synapse's main bottleneck -- though I imagine it would have a bump in performance across the system. @ShadowJonathan how difficult would it be to write a PoC to use this lib across Synapse so that we could get an idea of potential performance gains? |
I can write a branch that will utilize |
One solution is just to run it on a personal homeserver and see what breaks/if it produces a notable change in metrics. |
We did just that, got it to run on @anoadragon453's homeserver, and I'm thinking of making an PR where this is the default behaviour (after having discussed that a little). The tests on anoa's homeserver returned inconclusive, with some slight positive variations, and I think testing on a larger homeserver is required before the gains really show themselves, thus the decision to PR this. The branch we tested is based on #10402, thus things are blocked until that merges. |
@ShadowJonathan is this no longer blocked? |
From the twisted 21.7.0.rc1 release:
uvloop
is pretty fast, and twisted can utilize asyncio event loops withasyncioreactor
, so i wonder if some speed boosts could be gained by switching toasyncioreactor
+uvloop
, even if optionally.The text was updated successfully, but these errors were encountered: