EDIT: When I opened this topic I suspected a hardware issue which is why I’m listing all those details. However, I now know it has to be a software problem because I can get the expected speeds when I use the nextcloud client instead of downloading with a web-browser.
Nextcloud version: 20.0.4
Operating system and version: Arch Linux 5.8.9-2-ARCH (aarch64)
Apache or nginx version: nginx 1.18.0
PHP version: 7.4.10
Rock64 Single-Board-Computer with SD card for OS, 2x1TB HDD (btrfs-RADI1) connected via USB 3.
Nextcloud data and config are stored on HDDs.
The issue you are facing:
When downloading files from my nextcloud throughput caps out at around 350 KB/s. The uplink and hardware should be capable of much more. In the past I got around 6MB/s of thoughput from the same setup. I’ve investigated the I/O on the system and noticed something strange: during the downloads, I observe heavy write load on the SD card. It’s close to the amount of data read from the HDDs. These screenshot show statistics gathered with iostat
in 2 60s intervals, i.e. I/O-load during the 2 minutes of the download. mmcblk0
is the SD card while nextcloud data resides on sdc
and sdd
.
This is my config:
<?php
$CONFIG = array (
'instanceid' => 'xxx',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
array (
0 => 'xxx',
1 => 'xxx',
),
'datadirectory' => '/path/on/btrfs/raid',
'skeletondirectory' => '',
'dbtype' => 'mysql',
'version' => '20.0.4,
'overwrite.cli.url' => 'xxx',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'xxx',
'dbpassword' => 'xxx',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'filelocking.enabled' => 'true',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'timeout' => 0.0,
),
'maintenance' => false,
'theme' => '',
'loglevel' => 2,
);
I suspect something in my PHP setup but I have no experience with PHP , fastcgi, php-fpm etc. I’ve set fastcgi_cache_path
to point to a directory on the same file system as my nextcloud data, i.e. the RAID1-HDDs but that hasn’t helped.
Can someone help me in narrowing down the cause?
EDIT: I’ve noticed that the issues occurs only when downloading via a web browser. When I sync using the nextcloud client I get the expected speed.