After a long search why my TrueNAS instance takes so much memory for services, I found out that the Nextcloud plugin takes a huge amount of memory for spawning a lot of
After some more research I found out that the default php settings of the plugin are obviously chosen for really large Nextcloud instances with hundreds or thousands of parallel requests. This is is far away from the scenario at home or in a small company.
The default settings in
which means at least 25 php-fm server instances (!) without any traffic and up to 100 instances.
Changing the settings to (installing and using
the server opens new php-fp server instances only if required and my memory is now nicely tidied up and available for the ZFS cache again.
The TrueNAS version is TrueNAS-13.0-U6.1 on both systems, one is a HP MicroServer, the other a SuperMicro Storage server.
php-fm
instances (using top -o res). The instance took in total about 6 of my 8 GB RAM on my home server and about 20 of 64 GB RAM on the company server.After some more research I found out that the default php settings of the plugin are obviously chosen for really large Nextcloud instances with hundreds or thousands of parallel requests. This is is far away from the scenario at home or in a small company.
The default settings in
/usr/local/etc/php-fpm.d/nextcloud.conf
are:Code:
pm = dynamic pm.max_children = 100 pm.start_servers = 25
which means at least 25 php-fm server instances (!) without any traffic and up to 100 instances.
Changing the settings to (installing and using
nano
inside the jail):Code:
pm = ondemand pm.max_children = 50
the server opens new php-fp server instances only if required and my memory is now nicely tidied up and available for the ZFS cache again.
The TrueNAS version is TrueNAS-13.0-U6.1 on both systems, one is a HP MicroServer, the other a SuperMicro Storage server.