Nextcloud version : 19.0.4
Operating system and version : CentOS Linux 8
Nginx version : 1.14.1
PHP version : 7.4.10
DB mariadb version : * 10.3.17*
Current config:
Virtualized server on ESXi host
VM resources:
CPU: 16 cores Xeon e5-2680v2
RAM: 20GB DDR3 1333MHz
Disks: RAID 5 (4x SSD Samsung PRO 860 1TB)
Nextcloud have local storage with 10000 files in 1 folder (5000 files are empty, other 5000 files are 5MB size), also previously I’ve tested config with external storage via SMB share with about 10000 folders in parent folder.
Main problem is slow refreshing of website when I open folder with 10K files/folders. Every refresh of site leads to slow displaying of content. It loading 6-7 seconds. This problem is observed on both local and external storage.
Other important problem - broken search in folders with many files. In test folder with 10000 files search stops site and page not responding.
Main question - How do speed up loading of webpages with such content (10K files)?
Tried to tune nginx, php-fpm, DB, memory-caching, but haven’t seen difference. Also tried to switch nginx to apache, install other versions of Nextcloud (10 to 20), disable unused Nexcloud apps.
Additional Information
Other symptoms:
In moment when folder is opening one CPU core loads 100% by process php-fpm pool www.
Current /etc/php-fpm.d/www.conf :
[www]
user = nginx
group = nginx
listen = /run/php-fpm/www.sock
listen.acl_users = apache,nginx
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 220
pm.start_servers = 24
pm.min_spare_servers = 12
pm.max_spare_servers = 35
slowlog = /var/log/php-fpm/www-slow.log
request_slowlog_timeout = 3
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache
php_value[opcache.file_cache] = /var/lib/php/opcache
Current /var/www/nextcloud/config/config.php:
<?php
$CONFIG = array (
'instanceid' => '***',
'passwordsalt' => '***',
'secret' => '***',
'trusted_domains' =>
array (
0 => 'nextcloud.***.***',
),
'datadirectory' => '/var/www/nextcloud/data',
'dbtype' => 'mysql',
'version' => '19.0.4.2',
'overwrite.cli.url' => 'http://nextcloud.***.***',
'dbname' => 'nextcloud',
'dbhost' => '127.0.0.1',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => '***',
'installed' => true,
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
'maintenance' => false,
'theme' => '',
'loglevel' => 2,
'log_type' => 'file',
'log_file' => '/var/log/nextcloud.log',
'memcache.local' => '\\OC\\Memcache\\APCu',
'skeletondirectory' => '/var/www/nextcloud/data/donotdeletme',
'updater.release.channel' => 'stable',
'onlyoffice' =>
array (
'verify_peer_off' => true,
),
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '127.0.0.1',
'port' => 6379,
),
'enable_previews' => false,
'auth.bruteforce.protection.enabled' => false,
'simpleSignUpLink.shown' => false,
Thank you in advance for your response!