From 5d1851e5b78b92ecabd518f3434f96e03b8c18e4 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Thu, 26 Aug 2021 12:41:59 +0200 Subject: [PATCH] Add fpm tuning config Closes https://git.coopcloud.tech/coop-cloud/nextcloud/issues/16#issuecomment-8284. --- abra.sh | 1 + compose.yml | 6 ++++++ fpm-tune.ini | 5 +++++ 3 files changed, 12 insertions(+) create mode 100644 fpm-tune.ini diff --git a/abra.sh b/abra.sh index 1777e05..5ec3bc7 100644 --- a/abra.sh +++ b/abra.sh @@ -1,3 +1,4 @@ +export FPM_TUNE_VERSION="v1" export NGINX_CONF_VERSION="v2" NC_APP_DIR="app:/var/www/html" diff --git a/compose.yml b/compose.yml index 95674c6..d6df975 100644 --- a/compose.yml +++ b/compose.yml @@ -37,6 +37,9 @@ services: image: nextcloud:22.1.0-fpm depends_on: - db + configs: + - source: fpm_tune + target: /usr/local/etc/php/conf.d/fpm-tune.ini secrets: - db_password - admin_password @@ -137,6 +140,9 @@ configs: name: ${STACK_NAME}_nginx_${NGINX_CONF_VERSION} file: nginx.conf.tmpl template_driver: golang + fpm_tune: + name: ${STACK_NAME}_fpm_tune_${FPM_TUNE_VERSION} + file: fpm-tune.ini networks: proxy: diff --git a/fpm-tune.ini b/fpm-tune.ini new file mode 100644 index 0000000..ba19cb0 --- /dev/null +++ b/fpm-tune.ini @@ -0,0 +1,5 @@ +pm = dynamic +pm.max_children = 120 +pm.start_servers = 12 +pm.min_spare_servers = 6 +pm.max_spare_servers = 18