Re:Ask HN: Why does P2P encrypted messaging still suck?
by tomc1985 on Tuesday April 03, 2018 @02:31PM
(#16747678)
> 20 users sits around 4gb
dafuq? Are you serious? What could possibly need 4gb?
Re:Ask HN: Why does P2P encrypted messaging still suck?
by Arathorn on Tuesday April 03, 2018 @04:17PM
(#16748669)
The problem isn't the number of connected or registered users on the server - the problem is the complexity of the rooms they are participating in. So if those 20 users join hundreds of rooms with tens of thousands of users participating, spread across thousands of servers, with large numbers of joins/parts or messages sent a second... you shouldn't be surprised that it takes a few GB of RAM.
HOWEVER, we have been working incredibly hard at optimisation over the last few months, and we have order-of-magnitude algorithmic performance improvements on the horizon over the coming weeks. https://twitter.com/matrixdotorg/status/979049079568240641 etc. There's also a port to python3 happening which should improve RAM by 2-3x given python3 stores strings in utf8 rather than python2's utf32.
Re:Ask HN: Why does P2P encrypted messaging still suck?
by subway on Tuesday April 03, 2018 @04:37PM
(#16748874)
I certainly don't mean to throw any shade on the project -- if anything, the RAM utilization was less of a surprise for me than being bound to single-core performance by default. Sure, it's possible to split Synapse up into workers, but it definitely feels like there's some voodoo involved (my first attempt at setting just a Synchroton worker failed miserably this week)
Re:Ask HN: Why does P2P encrypted messaging still suck?
by tomc1985 on Tuesday April 03, 2018 @05:12PM
(#16749307)
Is it really necessary to maintain the state of the entire network on all federated nodes? (Since I'm guessing that's what you've described)
Re:Ask HN: Why does P2P encrypted messaging still suck?
by Arathorn on Tuesday April 03, 2018 @05:16PM
(#16749352)
It isn't necessary, and we don't do it. What I've described is what happens if you type '/join #matrix:matrix.org' and your server starts participating in a large room which spans tens of thousands of users and hundreds of servers. Rooms are only replicated over the servers which participate in them. So if you don't join massive rooms, your server can be have fine. (And in the near future massive rooms should be usable too).
Re:Ask HN: Why does P2P encrypted messaging still suck?
by 16 on Tuesday April 03, 2018 @02:03PM
(#16747366)
Have you tried leaving any giant rooms you may be in? Like Riot/Matrix HQ? I use my personal homeserver for my friends/some IRC channels and my load is nonexistent. May not be the answer you're looking for, but those huge (10,000+ users) rooms are a huge strain on homeservers right now. Look for performance updates in the next version of synapse.
Re:Ask HN: Why does P2P encrypted messaging still suck?
by subway on Tuesday April 03, 2018 @04:34PM
(#16748839)
Yup -- that's exactly what the end solution was. Unfortunately reaching out to those 20 users and saying "hey, could you be judicious about which federated rooms you join? otherwise you're gonna hose us all" kinda sucks.
Re:Ask HN: Why does P2P encrypted messaging still suck?
by derefr on Tuesday April 03, 2018 @02:25PM
(#16747604)
I've been considering writing a Synapse-equivalent Matrix server in Elixir, if there was enough interest.
Re:Ask HN: Why does P2P encrypted messaging still suck?
by dest on Tuesday April 03, 2018 @03:38PM
(#16748349)
FYI there have been efforts to rewrite an equivalent in Golang: https://github.com/matrix-org/bullettime
Re:Ask HN: Why does P2P encrypted messaging still suck?
by voxadam on Tuesday April 03, 2018 @04:23PM
(#16748717)
Dendrite seems to be a much more active Matrix server written in Go.
Re:Ask HN: Why does P2P encrypted messaging still suck?
by stevenicr on Tuesday April 03, 2018 @09:02PM
(#16750953)
from the bit I learned at a phoenix/elixer meetup - it seemed that it may be the most well suited for multiple chat streams. I am really interested in this.
Re:Ask HN: Why does P2P encrypted messaging still suck?
by tacoman on Tuesday April 03, 2018 @11:53PM
(#16751750)
I have a single non-federated synapse server with 10 users and 25 client devices, and the python process is using 135MB (RES in top). Load average is 0.00. There's 2 main rooms and probably around 10 chats. The homeserver.db is 26MB.
There's some work that can be done to proxy some of the load off into separate workers, but Synapse is pretty darn awkward to work with.