1,035
edits
No edit summary |
No edit summary |
||
Line 78: | Line 78: | ||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||
</pre> | </pre> | ||
== [[Postgresql]] == | |||
=== PGTune === | |||
Following the advice of PGTune ( https://pgtune.leopard.in.ua/ ), postgres is configured like: | |||
<code>/etc/postgresql/15/main/postgresql.conf</code> | |||
<syntaxhighlight> | |||
# DB Version: 15 | |||
# OS Type: linux | |||
# DB Type: web | |||
# Total Memory (RAM): 4 GB | |||
# CPUs num: 4 | |||
# Connections num: 200 | |||
# Data Storage: ssd | |||
max_connections = 200 | |||
shared_buffers = 1GB | |||
effective_cache_size = 3GB | |||
maintenance_work_mem = 256MB | |||
checkpoint_completion_target = 0.9 | |||
wal_buffers = 16MB | |||
default_statistics_target = 100 | |||
random_page_cost = 1.1 | |||
effective_io_concurrency = 200 | |||
work_mem = 2621kB | |||
huge_pages = off | |||
min_wal_size = 1GB | |||
max_wal_size = 4GB | |||
max_worker_processes = 4 | |||
max_parallel_workers_per_gather = 2 | |||
max_parallel_workers = 4 | |||
max_parallel_maintenance_workers = 2 | |||
</syntaxhighlight> | |||
== References == | == References == |