this post was submitted on 04 Jan 2024
426 points (99.1% liked)

Meta (lemm.ee)

3566 readers
36 users here now

lemm.ee Meta

This is a community for discussion about this particular Lemmy instance.

News and updates about lemm.ee will be posted here, so if that's something that interests you, make sure to subscribe!


Rules:


If you're a Discord user, you can also join our Discord server: https://discord.gg/XM9nZwUn9K

Discord is only a back-up channel, !meta@lemm.ee will always be the main place for lemm.ee communications.


If you need help with anything, please post in !support instead.

founded 1 year ago
MODERATORS
 

Hey folks

This is a heads up that I will be performing some maintenance and hardware upgrades on our database this Saturday.

We are currently experiencing several spikes throughout the day which cause our database to become overloaded - this results in degraded performance for many users. The spikes are happening due to a combination of continued growth of the database, some expensive periodic scheduled tasks which Lemmy runs, and fluctuating traffic patterns. Some of this can be optimized on the code level in the future, but it seems that the best way to deal with it right now is to add some additional resources to our database server.

I am intending to switch to slightly different hardware in this upgrade, and will be unable to make this switch without downtime, so unfortunately lemm.ee will be unavailable for the duration.

As our database has grown quite a bit, cloning it will most likely take a few hours, so I expect the downtime to last 2-3 hours. Sorry for the inconvenience, I am hopeful that it will be worth it and that this upgrade will significantly reduce some of our recent long page load times!


Edit: upgrade complete!

I have now migrated the lemm.ee database from the original DigitalOcean managed database service to a dedicated server on Hetzner.

As part of this migration, I have also moved all of our Lemmy servers from the DigitalOcean cloud to Hetzner's Cloud. I always want the servers to be as close as possible to the database, in order to keep latencies low. At the same time, I am very interested in having the ability to dynamically spin up and down servers as needed, so a cloud-type solution is really ideal for that. Fortunately, Hetzner allows connecting cloud servers to their dedicated servers through a private network, so we are able to take advantage of a powerful dedicated server for the database, while retaining the flexibility of the cloud approach for the rest of our servers. I'm really happy with the solution now.

In terms of results, I am already seeing far better page load times and far less resource use on the new hardware, so I think the migration has been a success. I will keep monitoring things and tuning as necessary.

you are viewing a single comment's thread
view the rest of the comments
[–] sunaurus@lemm.ee 10 points 10 months ago* (last edited 10 months ago) (1 children)

Currently the database is a managed DigitalOcean Postgres instance, but I am going to migrate it to a 32 thread 128 gb RAM dedicated server.

It's something that I've been hoping we won't need, as the managed database service has allowed me to not worry about patches, backups, etc (they took care of all of that automatically). Unfortunately it is clear now that further upgrades are just too costly on that service & actually the amount of configuration and tuning I would like to do is simply not possible there. So seems like right now, moving to the dedicated server for the database is the only option.

[–] wintermute_oregon@lemm.ee 2 points 10 months ago

Makes sense. I appreciate the reply back. I use to work on highly available fault tolerant systems. So I’m always interested how much hardware/etc to run something.

Sounds like some serious optimization needs to be done or there are a lot more transaction than I was expecting.