1

If you are running big applications on top of PostgreSQL or having a lot of queries your performance might be impacted. By default the default PostgreSQL configuration is to say the least, less than ideal. Same is true for MariaDB but that is out of scope now.

Performance fine tuning your server configuration is key for better overall improvements and making the best use of your hardware! Increasing several key configuration settings in PostgreSQL can already make a huge impact! In the guide below I explain which configuration you need to pay extra attention to and also advise to increase huge pages under Linux when you're using PostgreSQL or MariaDB for that matter.

Please follow the latest PostgreSQL configuration I shared here for Mbin specifically, but can be applied to any application using a PostgreSQL DB: PostgreSQL guide

For more information on fine tuning MariaDB, Nginx, PHP or other Linux kernel configurations, I advise you to checkout my snippets on my GitLab instance: https://gitlab.melroy.org/-/snippets/609, https://gitlab.melroy.org/-/snippets/92, https://gitlab.melroy.org/-/snippets/87

top 7 comments
sorted by: hot top controversial new old
[-] Sagar@sopuli.xyz 0 points 1 year ago
[-] melroy@kbin.melroy.org 1 points 1 year ago

What about it :P? SQLite is also nice... But I rather go to PostgreSQL on production systems.

[-] mayoi@sh.itjust.works 0 points 1 year ago* (last edited 1 year ago)

If SQLite was enough, you never used PostgreSQL in the first place. The post clearly is for cases when distributed database is needed.

[-] Sagar@sopuli.xyz 0 points 1 year ago* (last edited 1 year ago)

PgSQL is gigantic compared to SQLIte. Also, current versions of SQLite are very very optimized! I think it is sufficient!

About distributed databse, I'm not sure, maybe one can use multiple sqlite databases across multiple nodes, sort and use accordingly.

[-] mayoi@sh.itjust.works 1 points 1 year ago

If Postgres is gigantic then whatever you're doing isn't.

[-] Sagar@sopuli.xyz 0 points 1 year ago

Aah well, I mistook it for MySQL. 23.5MB tarball is quite great! Still SQLite, for 3MB is what I prefer!

[-] melroy@kbin.melroy.org 1 points 1 year ago

It's not just the size of the tarball or binary. It's also about how it scales in terms of performance when you have 400 users per hour on your server. Mbin is using PostgreSQL, can you imagine if Lemmy would SQLite.. your page will never load.. haha

this post was submitted on 10 Nov 2023
1 points (100.0% liked)

Today I Learned

1 readers
1 users here now

Today I Learned (TIL). You learn something new every day; what did you learn today?

founded 2 years ago
MODERATORS