this post was submitted on 04 Jul 2023
5 points (85.7% liked)
Lemmy Server Performance
3 readers
1 users here now
Lemmy Server Performance
lemmy_server uses the Diesel ORM that automatically generates SQL statements. There are serious performance problems in June and July 2023 preventing Lemmy from scaling. Topics include caching, PostgreSQL extensions for troubleshooting, Client/Server Code/SQL Data/server operator apps/sever operator API (performance and storage monitoring), etc.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thanks for doing all this.
Do we have any real numbers from a real server? How many votes are trying to be federated to how many servers?
Just ballparking some approximate numbers:
15000 * 4000 * 10 = 600,000,000 federated actions. That is around 7,000 per second 24/7 for one community.
IMO, this real time federation just doesn't scale. We need to start planning the specs for federation batching.
I'm hoping the 'subscribed servers' is maybe only 300 or so? But I don't know, the big sites haven't been sharing information like that in my experience. They did say there were "millions" of outbound federation tasks. I expect the number of votes by user is higher than your number. They did put in code changes to detect servers they can't reach and to stop attempting delivery.
I think a pull app that goes around to servers with content and uses the front-end API to grab 300 or more comments at a time, etc is the way to go. The client API is geared toward batch delivery. since lemmy.ml is so unstable for discussion, I opened a topic on GitHub: https://github.com/RocketDerp/lemmy_helper/discussions/4 - where I proposed some new /api/syncshare to get more raw data out of the PostgreSQL tables.