From 9fc42c44a88b707a669782f7491f7f519c3fc6db Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 31 Oct 2023 21:24:27 +0100 Subject: [PATCH] fix: tune nextcloud / php-fpm pool settings Calculated on https://spot13.com/pmcalculator/ with 4GiB RAM available, average php-fpm process size 80MiB Original settings are pm = dynamic pm.max_children = 32 pm.max_requests = 500 pm.max_spare_servers = 4 pm.min_spare_servers = 2 pm.start_servers = 2 --- hosts/nachtigall/apps/nextcloud.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hosts/nachtigall/apps/nextcloud.nix b/hosts/nachtigall/apps/nextcloud.nix index d3f430d..b93af37 100644 --- a/hosts/nachtigall/apps/nextcloud.nix +++ b/hosts/nachtigall/apps/nextcloud.nix @@ -71,7 +71,7 @@ # This is to allow connections to collabora and keycloak, among other services # running on the same host - # + # # https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/config_sample_php_parameters.html?highlight=allow_local_remote_servers%20true # https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/293 allow_local_remote_servers = true; @@ -115,6 +115,17 @@ "opcache.interned_strings_buffer" = "16"; }; + # Calculated with 4GiB RAM, 80MiB process size available on + # https://spot13.com/pmcalculator/ + poolSettings = { + pm = "dynamic"; + "pm.max_children" = "52"; + "pm.max_requests" = "500"; + "pm.max_spare_servers" = "39"; + "pm.min_spare_servers" = "13"; + "pm.start_servers" = "13"; + }; + caching.redis = true; autoUpdateApps.enable = true; database.createLocally = true;