14
submitted 1 year ago by kense@lmmy.dk to c/lemmy_support@lemmy.ml

Hi everyone

I am pretty new to all of this, so I'm currently in what I consider my "sandbox phase" of hosting a Lemmy instance.

Before promoting my instance to others I want to ensure that it's working as it should and federation is quick and "in sync" with the major instances.

Looking at the logs I see federation is at it and working at approx 4-8 req/s - but is there a way to speed this up?

Would more workers (and thus more cores on the server) in postgres speed things up? Or perhaps more parallel workers?

As stated I'm pretty new to this, and when searching for similar questions on lemmy/github I can't seem to find the answer to this specific question - it's usually implied that one should know all of this before hosting.

I've looked into how postgres is working, but am unsure if this is the only parameter that can be changed to speed up federation.

you are viewing a single comment's thread
view the rest of the comments

Check the database pool_size variable in the Lemmy configuration.

[-] kense@lmmy.dk 5 points 1 year ago* (last edited 1 year ago)

Seems like a great place to look.

I installed via Ansible, so the config doesn't include the pool_size by default.

I can see that the default value is 5
I'll go straight ahead and fiddle with this, but do you (or anyone else) have any recommendations, based on how postgres is working and memory/cpu loads?

(I'm not about to bump it to 100, but maybe someone has already found the "natural limit")

[-] dandroid@dandroid.app 2 points 1 year ago

I think I changed mine to like 1000 or something. Lemmy still uses basically no ram or cpu on my server, even with this change.

[-] kense@lmmy.dk -1 points 1 year ago* (last edited 1 year ago)

Allright, so this is isn't the parameter that'll speed things up by itself.

I set it to 10 (a bit more cautious than you, but this is somewhat new ground for me) and didn't record more req/s, but it feels like the instance is a bit slower in terms of loading times. After I have tucked the kids in tonight I'll snoop around netdata (where I'm monitoring the servers) to see what (or if something) has changed.

this post was submitted on 04 Aug 2023
14 points (100.0% liked)

Lemmy Support

4655 readers
14 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS