Hacker News new | past | comments | ask | show | jobs | submit login

I'd be wary of Librem Chat being viable long term, Synapse (the server software for matrix) is a real ram hog, we see it hover at ~2GB of ram with 5 active users and have bumped its VM up to a dozen gigs of ram to deal with it OOMing (despite having 4GB of ram).

The documented switches like SYNAPSE_CACHE_FACTOR seem to cause wild oscillations in ram use and worsen the OOM problems, when enabled Synapse would jump between 500MB and 3.8GB of ram constantly, eventually OOMing.

Edit: Also, the support channels for Synapse exist, but you will rarely get any response.




Speaking as the project lead for Matrix; we are continuing to work on Synapse's RAM use, and it will only get better over time.

One big misconception is that somehow RAM usage is related to the number of users on your server - instead, it's related to the size & complexity of the rooms your users are participating in. In other words, one person who joins thousands of rooms with thousands of users in them will use a lot more RAM than a server with a thousand users who use it only for small group chats.

The things to check if your Synapse RAM is high are:

* Make sure you're running postgres. Sqlite is not currently usable in production.

* Make sure you're running Python 3.7

* Increase the synapse cache factor a bit.

* Check for and prune extremities (https://github.com/matrix-org/synapse/issues/1760), which will soon be a thing of the past, but we're not there quite yet.

If it's still overloaded, then you need to look at splitting the synapse master process off into workers (https://github.com/matrix-org/synapse/blob/master/docs/worke...) or disabling presence.

In terms of whether you get response in the support rooms - whilst the core team has been preoccupied with infrastructure security over the last few weeks, the rest of the community is generally happy to help with synapse tuning and the rooms are far from idle...


Looks like we are using sqlite and Python 3.5.3, synapse cache factor is currently not set in our config, any pointers for how to migrate to Postgres? This box has basically been given to me after the person who set it up gave up in frustration.


https://github.com/matrix-org/synapse/blob/master/docs/postg... has the details.

Fwiw, we're addressing the sqlite issue by stopping servers from federating for now if they are on sqlite (https://github.com/matrix-org/synapse/pull/5078). Sorry you got bitten by this.


It happens, guessing SQLite was default at one point or suggested by the install guide that was followed. Kinda surprised it has survived thus far, never really thought of SQLite as something for high volume, multi-user messaging.

Gonna go try the migration guide here :P


SQLite is definitely not ideal for high volume and high transaction frequency. Postgres will be better at that. I have used it for quickly getting a single table database up that I can just dump into and then query through linearly afterwards. It is better than dumping to JSON or some other purely textual serialization.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: