Browse Source

addd postgresql settings for hopefully better performance

pull/10/head
Mar Alegre 3 years ago
parent
commit
07c86e2007
  1. 11
      nextcloud/Containerfile
  2. 0
      nextcloud/assets/postgresql/pg_hba.conf
  3. 27
      nextcloud/assets/postgresql/postgresql.conf

11
nextcloud/Containerfile

@ -65,9 +65,14 @@ RUN mv php/php.ini /etc/php/${PHPV:?}/fpm/ && \
### PostgreSQL ###
###
# configure PostgreSQL access
COPY --chown=postgres:postgres assets/pg_hba.conf ./
RUN mv pg_hba.conf /etc/postgresql/${PSQLV:?}/main/
# configure PostgreSQL
COPY --chown=postgres:postgres assets/postgresql ./
# If the posgresql.conf file contains multiple entries for the same parameter, all but the last one is ignored.
# So we can just append our settings to the already-existing postgresql.conf file.
RUN mv postgresql/pg_hba.conf /etc/postgresql/${PSQLV:?}/main/ & \
cat postgresql/postgresql.conf >> /etc/postgresql/${PSQLV:?}/main/postgresql.conf
###
### Apache

0
nextcloud/assets/pg_hba.conf → nextcloud/assets/postgresql/pg_hba.conf

27
nextcloud/assets/postgresql/postgresql.conf

@ -0,0 +1,27 @@
# The following configuration parameters were generated using the PGTune tool
# https://pgtune.leopard.in.ua/
# parameters:
# DB Version: 13
# OS Type: linux
# DB Type: web
# Total Memory (RAM): 16 GB
# CPUs num: 6
# Data Storage: ssd
max_connections = 200
shared_buffers = 4GB
effective_cache_size = 12GB
maintenance_work_mem = 1GB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 6990kB
min_wal_size = 1GB
max_wal_size = 4GB
max_worker_processes = 6
max_parallel_workers_per_gather = 3
max_parallel_workers = 6
max_parallel_maintenance_workers = 3
Loading…
Cancel
Save