Hi
I am running nextcloud (your standard PHP w MySQL webapp) in a very overbuilt VM but performance isn't as good as I would hope (don't get me wrong it is passable but not "fast").
Currently serving with:
-Centos8 OS
-Nginx webserver
-PHP7.4/PHP-FPM
-MariaDB 10.3 (pretty sure it isn't compatible with 10.4)
-Redis caching
HV is proxmox. Architecture is Haswell for the CPU. VM has 12c/16GB RAM (both of which can be increased but I sense this is not my bottleneck).
For comparison I have an alnmost identical nextcloud instance on a VM on Zen+ architecture which runs way way faster with way less cores and RAM. (I know frequency comparison is off but I am talking a seriously noticable difference).
I have opcache & REDIS for caching and GTMetrix from a geo close server registers the first contentful paint at 650ms and a fully loaded time of 1.6s... for the login page. I have upped the following configs but if I am honest I don't know what I am doing and would be grateful of any advice of tweaks I can make to webserver, php-fpm, mariadb or REDIS (or even perhaps the pve VM) confs that will improve performance. All of the guides I have read have either been easy wins (like enable Redis) or a little lacking in substance (the official nc docs don't really discuss changing away from service defaults):
Code:
grep worker_ /etc/nginx/nginx.conf
worker_processes 4;
worker_connections 2048;
Code:
grep 'pm\.' /etc/php-fpm.d/www.conf|grep -v \;
pm.max_children = 256
pm.start_servers = 59
pm.min_spare_servers = 59
pm.max_spare_servers = 177
Memory allocated to PHP and PHP-FPM is 4G.
Appreciate any feedback on service performance tuning from experienced sysadmins!