Homelab NC Slow upload

Nextcloud 11.0.3
Debian 8.7
Apache 2.4.10
PHP 7.0.18-1~dotdeb+8.1
ISP: 1gig Fiber
Storage: NFS share from FreeNAS ZFS Pool. ZFS RAIDZ2x2 (24 2TB drives total)
10Gb fiber link from FreeNAS to Host Server. ( I get more than 600MBs on average reading and writing to the NAS)

Is this the first time you’ve seen this error?:
No

Can you reliably replicate it? (If so, please outline steps):
Just uploading any file is extremely slow. I upload larger .rar files often that I will share via links.

The issue you are facing:
Whenever I upload files I never get more than 5mbps. I’ve tried Chrome,FF, and IE with same results. Never exceed 6mbps. Average is about 5.4Mbits/s when monitoring with nload. I’m not expecting to get like gigabit speeds or even break 100mbps. Just would like to atleast hit 30-50mbps if possible, even if that is just internally. When downloading, ill get over 400mbps.

The output of your Nextcloud log in Admin > Logging:
Doesn’t seem to be any relative information currently. Just a bunch of access requests.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php $CONFIG = array ( 'instanceid' => 'oczlymvs3sp2', 'passwordsalt' => '****', 'secret' => '****/D2decv/UjiKD0gFr8OMWOecX', 'trusted_domains' => array ( 0 => '10.10.0.22', 1 => '10.10.10.22', 2 => '****', ), 'datadirectory' => '/mnt/nextcloud/data', 'overwrite.cli.url' => 'http://10.10.0.22/nextcloud', 'dbtype' => 'mysql', 'memcache.local' => '\OC\Memcache\APCu', 'version' => '11.0.3.2', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => '****', 'dbpassword' => '***', 'logtimezone' => 'UTC', 'installed' => true, ); The output of your Apache/nginx/system log in `/var/log/____`: **errorlog**: `[Mon Jul 10 06:25:03.008029 2017] [mpm_prefork:notice] [pid 739] AH00163: Apache/2.4.10 (Debian) configured -- resuming normal operations [Mon Jul 10 06:25:03.008074 2017] [core:notice] [pid 739] AH00094: Command line: '/usr/sbin/apache2'` Im sure there is more information that will be needed, just let me know. Thanks!

How fast can you write directly on the NFS share? Do you mount the NFS share into your file system or do you use it as external storage?

Can you send a file from your server? Just use cadaver to connect through webdav. So you cut out any network related problems between client and server. Also when uploading, check your system,
which process is taking a lot of resources, i/o waits, …

A file locking cache is already one thing which speeds up a little and takes load away from your database. Did you optimize the cache settings of your database?

1 Like

How fast can you write directly on the NFS share? Do you mount the NFS share into your file system or do you use it as external storage?

I have the NFS Share mounted via fstab. I can easily get 600MB/s writing files directly to the NFS share. I also have a file locking cache setup. I have not updated the cache settings of my database. Do you have any articles to follow regarding “optimization of the cache setting for the database”?

Can you send a file from your server? Just use cadaver to connect through webdav. So you cut out any network related problems between client and server. Also when uploading, check your system,
which process is taking a lot of resources, i/o waits, …

What do you mean by send a file from my server? You want me to send you a link?
I do have this virtual machine running on the same server as my plexmediaserver, however I have my VM’s running on Raid0 2xSSDs so as far as io waits here are some stats from sysstat

'Linux 3.16.0-4-amd64 (nextcloud)        07/26/2017      _x86_64_        (16 CPU)

avg-cpu:  %user   %nice  %system %iowait  %steal   %idle
           0.07    0.00    0.02    0.27    0.00    99.65

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda               1.29         0.31        25.09     763779   61791092'

Thanks for the reply, and sorry for the delay, been super busy at work lately.

There are some tips around in the forum, but we don’t have an exhaustive guide to follow ;-(

That you use the terminal on your server to connect via webdav to Nextcloud, this way you cut out problems in the connection between client and server.

The 0,3% iowait indicates that the processes have to wait for data to be written to a hard-disk/network share. You can use iotop to monitor which processes are affected by this. In case it is the database server, you are back to database optimizations.