News for hackers. Stuff that matters.
Re:How the European Commission rolled out Matrix to more tha... by Hoodedcrow on Thursday November 19, 2026 @07:42AM (#50559357)
Same but with XMPP! Much easier to host (there is an order of magnitude difference in resource consumption). Although my client can't do live location, only manually sending the current point.
Re:How the European Commission rolled out Matrix to more tha... by phil294 on Thursday November 19, 2026 @07:51AM (#50559454)
Why is the resource consumption of the Matrix server implementations so high? What are they doing that hits so heavy on performance? Encryption? But isn't it e2e? State resolution? Surely the resolution algorithms can't be that bad?

Even Dendrite, the eternally-WIP-rewrite in Go, was so bad I couldn't even start it on my Raspi.

Re:How the European Commission rolled out Matrix to more tha... by cvwright on Thursday November 19, 2026 @08:26AM (#50559798)
Unless things have changed a lot in the last few years, it’s state resolution.

And yes the algorithms are tough - especially if you’re in the bigger rooms with lots of servers that don’t always work right.

Re:How the European Commission rolled out Matrix to more tha... by Arathorn on Thursday November 19, 2026 @08:41AM (#50559986)
The reason Matrix typically consumes more resources than XMPP is because it's replicating a large DAG of state events (i.e. the key-value data associated with a room; not the room's actual messages) between all participating servers. So, in a room with 100K users, each server has to maintain at least 100K state events (every time someone joined a room, or changed their name, or left the room, or set permissions, or changed the room's name etc).

Then, whenever the state of the chatroom changes (e.g. you join it, or someone else joins it), each server has to resolve its view of the state of the room with the proposed change. We call this merge conflict resolution algorithm 'state resolution', and it's typically where the heaviness comes from, as a naive implementation loads up all the state events for the room in order to calculate and store the new state.

In exchange, you get fully decentralised access control, and an eventually consistent zero-trust distributed key-value store, with resilience to network partitions (including in P2P environments) - unlike (say) vanilla XMPP which applies access control and KV on a single given server per-conversation.

Now, the key thing is that *there is nothing in the protocol which makes this intrinsically heavy to implement*. The only reason that servers can be heavyweight today is simply because more time has been invested in chasing down more pressing issues like encryption issues, investing in client SDKs, speeding up sync responses, switching to OIDC for auth, etc.

The problem is made worse by the fact that Synapse (the original Python server) has historically been particularly clunky, skewing perception. Over the last few years this has improved significantly, although it could still be way better - at the Matrix Conference last month (https://youtu.be/kdEDxI2MCjA?list=PLFDUAtPqCX98&t=329) we showed off a fork which had improved CPU 10x by shifting the hot path entirely to Rust from Python. (It turns out that over 2026, we wrote as much Rust for Synapse as we did Python, ignoring tests). Further improvements would be to memoize the state res and calculate it incrementally rather than starting from scratch every time. Similarly, there are 100x improvements to be had on storage usage - e.g. by storing state temporally (c.f. my https://docs.google.com/presentation/d/1pKtLl4vCV3-8xz8crvxW... spike from last year).

So, why haven't these improvements landed yet? In practice, the team at Element who builds Synapse have had to focus on customer-driven work instead in order to keep the lights on, and frustratingly performance is lower down the todo list than other feature-work. On the plus side, over the last year or so Element has got into a much healthier state - hence us being able to show off the 10x improvements in Synapse last month (although they still need to land).

Meanwhile, elsewhere in Matrix there are other servers which are more actively focused on being lightweight right now (e.g. continuwuity), but don't have the maturity of Synapse (or the commercially supported distribution that Element provides). And even then, there's still a lot of headroom for speeding up and shrinking things - it should be very very doable to run Matrix on a tiny host like an RPi.

It's not a perfect analogy but I think of it as being similar to the evolution of DVCS systems. There's nothing intrinsically heavy or hard about replicating DAGs of source code between hosts, but Monotone was pretty slow and clunky while Git showed that a smarter implementation could be more than performant enough. The race is on to build the equivalent for Matrix.

Re:How the European Commission rolled out Matrix to more tha... by Hoodedcrow on Friday November 20, 2026 @02:18AM (#50571241)
My concern is also storage. It just keeps growing and I don't know to what exact extent it can be cleaned up. My VPS only has 20 gigs of storage, which is never an issue with XMPP (because the messages are ephemeral by default and media has an expiration date). Even text can add up over a really long time in active chats. Synapse seems to have better cleanup options (seen fewer retention options in, say, Continuwuity), but overall would like more insight into the possibilities.
Re:How the European Commission rolled out Matrix to more tha... by JadedBlueEyes on Thursday November 19, 2026 @09:53AM (#50560913)
You should try alternative homeserver implementations of Matrix! From private benchmarks, https://continuwuity.org/ can serve over 1,000 simultaneous clients on 1gb of RAM.
Re:How the European Commission rolled out Matrix to more tha... by Hoodedcrow on Friday November 20, 2026 @02:21AM (#50571268)
I used to use Conduit, but that broke some rooms with Synapse users (apparently Synapse deviates from the defined standard somehow). Besides that - yeah, that is a much more appealing option! Although I still don't know how well it would clean up storage (as I have a very constrained disk space). Seen some media options, but not sure how you clean up messages.
Re:How the European Commission rolled out Matrix to more tha... by wolvoleo on Thursday November 19, 2026 @08:38PM (#50569079)
Yes but XMPP is not nearly as advanced in the bridge department. Matrix has a whole ecosystem around it.