How to speed up webdav and gui on upload?

Hi,

I am running nextcloud on an odruid u3+ using an external usb3 stick to store my data.
Encryption is disabled in nextcloud.

I made serveral upload tests:

1 file (50 MB)

  • copy a scp (winscp client): 2900 KB/s.
  • copy a webdav(winscp client): 1900 KB/s

These values are not fast, but its ok for my usecase.

Copying pictures 35MB (66 jpeg files)

  • copy via scp (winscp client): takes 0 min, 18 sec. Winscp shows about 1900 KB/s
  • copy via webdav (winscp client) : takes 4 min, 10 sec. Winscp shows about 120 KB/s
  • copy via web frontent (vivaldi browser): takes about 2min, 30 sec.

I only measured each run once, but from my experience webdav is allways much slower than using scp.
What can I do to improve the webdav and GUI speed?

top - 10:20:35 up 14:56,  1 user,  load average: 3,45, 1,95, 1,16
Tasks: 103 total,   3 running, 100 sleeping,   0 stopped,   0 zombie
%CPU0  :  0,7 us,  0,7 sy,  0,0 ni, 98,0 id,  0,7 wa,  0,0 hi,  0,0 si,  0,0 st
%CPU1  :  0,7 us,  0,0 sy,  0,0 ni, 96,7 id,  2,7 wa,  0,0 hi,  0,0 si,  0,0 st
%CPU2  :  0,7 us,  0,7 sy,  0,0 ni, 98,7 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
%CPU3  :  0,0 us,  0,7 sy,  0,0 ni,  0,7 id, 98,7 wa,  0,0 hi,  0,0 si,  0,0 st
GiB Spch:    1,974 total,    0,255 free,    0,656 used,    1,063 buff/cache
GiB Swap:    0,000 total,    0,000 free,    0,000 used.    1,301 avail Spch

Same issue I have on downloading:
2MB via scp, 500kb via webdav.

top - 10:34:21 up 15:10,  1 user,  load average: 0,30, 0,34, 0,67
Tasks: 100 total,   1 running,  99 sleeping,   0 stopped,   0 zombie
%CPU0  : 18,1 us,  3,4 sy,  0,0 ni, 77,2 id,  0,7 wa,  0,0 hi,  0,7 si,  0,0 st
%CPU1  : 20,7 us,  2,0 sy,  0,0 ni, 76,7 id,  0,7 wa,  0,0 hi,  0,0 si,  0,0 st
%CPU2  : 40,0 us,  2,0 sy,  0,0 ni, 56,7 id,  1,3 wa,  0,0 hi,  0,0 si,  0,0 st
%CPU3  : 19,3 us,  0,7 sy,  0,0 ni, 78,7 id,  1,3 wa,  0,0 hi,  0,0 si,  0,0 st
GiB Spch:    1,974 total,    0,283 free,    0,614 used,    1,077 buff/cache
GiB Swap:    0,000 total,    0,000 free,    0,000 used.    1,344 avail Spch

Nextcloud version: 10.0.3
Operating system and version: arch linux
Apache or nginx version (eg, Apache 2.4.25): nginx 1.12.0-2
PHP version (eg, 5.6):php-fpm 7.1.6-1

list of used apps:

> php -f ./occ app:list
Enabled:
  - activity: 2.4.1
  - admin_audit: 1.1.0
  - bookmarks: 0.10.0
  - calendar: 1.5.3
  - comments: 1.1.0
  - contacts: 1.5.3
  - dav: 1.1.1
  - federatedfilesharing: 1.1.1
  - federation: 1.1.1
  - files: 1.6.1
  - files_accesscontrol: 1.1.2
  - files_pdfviewer: 1.0.1
  - files_sharing: 1.1.1
  - files_texteditor: 2.2
  - files_trashbin: 1.1.0
  - files_versions: 1.4.0
  - files_videoplayer: 1.0.0
  - gallery: 16.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - mail: 0.6.4
  - nextcloud_announcements: 1.0
  - notes: 2.2.0
  - notifications: 1.0.1
  - password_policy: 1.1.0
  - provisioning_api: 1.1.0
  - serverinfo: 1.1.1
  - sharebymail: 1.0.1
  - spreed: 1.2.0
  - survey_client: 0.1.5
  - systemtags: 1.1.3
  - templateeditor: 0.2
  - theming: 1.1.1
  - twofactor_backupcodes: 1.0.0
  - updatenotification: 1.1.1
  - workflowengine: 1.1.1
Disabled:
  - encryption
  - external
  - files_automatedtagging
  - files_external
  - files_retention
  - firstrunwizard
  - user_external
  - user_ldap
  - user_saml

So how can I speed up the webdav / gui speed?
Thanks a lot,
Butch

This is i/o wait, this means you have to wait for operations in your file system.

You should use the available caching mechanisms:
https://docs.nextcloud.com/server/12/admin_manual/configuration_server/caching_configuration.html?highlight=caching

And of course have a look into the cache settings of your database as well. There are scripts that help you to find suitable settings (tuning-primer, mysqltuner), e.g.:

https://github.com/owncloud/core/issues/20967#issuecomment-205474772