I recently moved a whole Nextcloud Instance from an old dedicated Corei3 Machine with old hdds to a a vserver 800gb ssd, 8vcores and 32gb ram - running arch linux.
this instance is accessed by 500 users daily and on the old machine it was running really smooth…
2-10% cpu not much ram.
on the new machine mysqld wastes 150% cpu during peaks and several php-fpm processes 30-60% which sums up to an average load of more than 6 !
on the old machine i ran php 7.3 on ubuntu which is the only difference i know of
(of course this is a virtual machine now… but not a bad one… could it be … ? …)
im running
nextcloud/18.0.3
nginx/1.16.1
mysqld/10.4.12-MariaDB
php/7.4.4
i am using apcu for local caching and redis for the rest
all recommended extensions are active and configured
the number of mysql connections can’t be the problem because the cpu load is sometimes very high with 26 active connections and almost zero another time with 65 connections.
sql slowlog shows nothing
processlist shows 2-3 running queries and 10 sleeping processes during heavy load… doesn’t seem too much to me?
the sql database uses ~300MB
all of the files ~200GB
in php slowlog on the other hand the following scripts show up constantly
script_filename = /srv/http/cloud/remote.php script_filename = /srv/http/cloud/ocs/v2.php
i’ve reduced the number of childprocessen for php-fpm down to 20 but the php log complains it’s not enough… so i will probably go back to 60 because it didn’t change anything on the cpu load but it produced lags onsite…
i reworked every config a hundret times now and read the nextcloud/latest manual twice… used all of the config examples there… nothing changes…
tried with http2 and without
with query cache and without
php, mysql, nginx log show no errors…
nevertheless the whole instance sometimes feels buggy… talk sometimes doesn’t show the chat history on first try. usermanagement shows users twice on first try… if i move a folder and enter another the moved folder is listet in the other folder until i reload…
one last thing:
nextcloud log itself shows a LOT of php errors… i tried a clean installation on the same machine to make sure it’s not my old instance thats buggy - same !
Error PHP Trying to access array offset on value of type bool
Error PHP Trying to access array offset on value of type int
Fatal webdav Sabre\DAV\Exception\BadRequest: Expected filesize of
Error PHP imagettftext(): Problem doing text layout at
Error text OCP\Files\NotFoundException:
i really hope someone comes up with an idea…
thank you very much in advance !!