logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 09d8b9cb553dc0d5cf18864ee0d82f099c82e5e9
parent: 6783d544b2d3856bda3f8f9136011923ee8b30fe
Author: lain <lain@soykaf.club>
Date:   Mon, 25 May 2020 17:45:40 +0000

Merge branch '1471-tuning-advice' into 'develop'

Docs: Document reasonable Postgres settings.

See merge request pleroma/pleroma!2581

Diffstat:

Adocs/configuration/postgresql.md31+++++++++++++++++++++++++++++++
Mdocs/installation/otp_en.md2+-
2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/docs/configuration/postgresql.md b/docs/configuration/postgresql.md @@ -0,0 +1,31 @@ +# Optimizing your PostgreSQL performance + +Pleroma performance depends to a large extent on good database performance. The default PostgreSQL settings are mostly fine, but often you can get better performance by changing a few settings. + +You can use [PGTune](https://pgtune.leopard.in.ua) to get recommendations for your setup. If you do, set the "Number of Connections" field to 20, as Pleroma will only use 10 concurrent connections anyway. If you don't, it will give you advice that might even hurt your performance. + +We also recommend not using the "Network Storage" option. + +## Example configurations + +Here are some configuration suggestions for PostgreSQL 10+. + +### 1GB RAM, 1 CPU +``` +shared_buffers = 256MB +effective_cache_size = 768MB +maintenance_work_mem = 64MB +work_mem = 13107kB +``` + +### 2GB RAM, 2 CPU +``` +shared_buffers = 512MB +effective_cache_size = 1536MB +maintenance_work_mem = 128MB +work_mem = 26214kB +max_worker_processes = 2 +max_parallel_workers_per_gather = 1 +max_parallel_workers = 2 +``` + diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md @@ -63,7 +63,7 @@ apt install postgresql-11-rum ``` #### (Optional) Performance configuration -For optimal performance, you may use [PGTune](https://pgtune.leopard.in.ua), don't forget to restart postgresql after editing the configuration +It is encouraged to check [Optimizing your PostgreSQL performance](../configuration/postgresql.md) document, for tips on PostgreSQL tuning. ```sh tab="Alpine" rc-service postgresql restart