Support intro
Thread about performance tuning of my nextcloud instance.
Note: I’m new to Nextcloud and all the performance tuning one can do to fit the server resources. There is a bunch of stuff in the admin manual that I’ve yet to try. The thing is that I’m pressed for time to fix this issue for my users, hence the thread. Quick tips about what I should focus on first and how I can troubleshoot to get to the crux of the problem are appreciated, otherwise I’ll be researching and tuning things on my own and update the thread as I see progress.
What I’ve tried so far:
- Changed postgresql.conf to have “shared_buffers = 1GB”
VPS Details
6 cores CPU
16GB RAM
400GB SSD storage
400 Mb/s network port
Versions
Nextcloud version: 17.0.2
Operating system and version: Arch Linux, Kernel: Linux 4.19.87-1-lts, Architecture: x86-64
Reverse-proxy nginx version: 1.17.5
Apache version: 2.4.38
PHP version: 7.3.14
Docker Setup
Here is the Base docker-compose setup that I’m using. I’m using the apache-17 image.
The settings I changed with that setup:
- Added the https override in the config.php because of the reverse-proxy and added a redis container.
The issue I’m facing
Slow web UI
Slow upload speed of larger files (100MB and up)
Is this the first time you’ve seen this error? (Y/N):
This has been an issue for some time now.
Steps to replicate it:
My users are complaining about the slow UI, but I don’t notice it myself, so can’t replicate that.
To reproduce the slow upload:
- scp a large (100MB maybe) file to the VPS, note how long it took
- upload the same file through the web interface, note how long it took
- note the big difference in speed (2 to 3 times slower in the web interface for me)
Logs
I’d have added the nginx and nextcloud logs but there’s just a bunch of sensitive info in them.
The output of your config.php file:
<?php
$CONFIG = array (
'instanceid' => 'XXX',
'passwordsalt' => 'XXX',
'secret' => 'XXX',
'trusted_domains' =>
array (
0 => 'files.somedomain.com',
1 => 'filesdev.somedomeain.com',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'pgsql',
'version' => '17.0.2.1',
'overwrite.cli.url' => 'https://files.somedomain.com',
'dbname' => 'nextcloud',
'dbhost' => 'db_container:5432',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'postgres',
'dbpassword' => 'XXX',
'installed' => true,
'loglevel' => 0,
'maintenance' => false,
'mail_smtpmode' => 'sendmail',
'mail_smtpsecure' => 'ssl',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'files',
'mail_domain' => 'files.somedomain.com',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'theme' => '',
'overwriteprotocol' => 'https',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'redis',
'port' => 6379,
'password' => false,
),
);