Performance of SFTP external storage very bad, but only through ownCloud

Steps to reproduce

  1. Connect ownCloud to an SFTP external storage (I use rsync net)
  2. Upload a 100 MB file to the external storage
  3. Download the file directly from the external storage and through ownCloud and compare speeds

Expected behaviour

I would expect the download to only be slightly slower than downloading directly from the external storage

Actual behaviour

  • Download through OwnCLoud WebInterface: 120 KB/s
  • Download from SFTP-Server directly (to client PC): 1.1 MB/s
  • Download from SFTP-Server directly (to ownCloud server): 700 KB/s

Server configuration

Operating system:
Debian 9.3.0

Web server:
Apache 2.4.25

MariaDB 10.1.37

PHP version: 7.2.15

ownCloud version: (see ownCloud admin page)

Updated from an older ownCloud or fresh install:
fresh install

Where did you install ownCloud from:

Signing status (ownCloud 9.0 and above):
No errors have been found.

The content of config/config.php:

List of activated apps:

  • comments: 0.3.0
  • configreport: 0.1.1
  • dav: 0.4.0
  • federatedfilesharing: 0.3.1
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: 0.7.1
  • files_external_dropbox: 1.1.0
  • files_external_ftp: 0.2.1
  • files_sharing: 0.11.0
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • market: 0.2.5
  • notifications: 0.3.5
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • updatenotification: 0.2.1
  • encryption
  • external
  • user_external

Are you using external storage, if yes which one: local/smb/sftp/…

Are you using encryption: yes/no
Only SSL

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
There are no commands defined in the “ldap” namespace.

Client configuration

Firefox 65.0 64 bit

Operating system:
Linux Mint 18.2


Web server error log

[Tue Feb 12 06:25:01.472806 2019] [mpm_prefork:notice] [pid 29107] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2q configured – resuming normal operations
[Tue Feb 12 06:25:01.472822 2019] [core:notice] [pid 29107] AH00094: Command line: ‘/usr/sbin/apache2’

ownCloud log (data/owncloud.log)


i don’t think there is that much you can do here or where other users can give specific pointers. :confused:

From what i know a download of files placed on the external storages is first downloaded to the ownCloud server and the forwarded to the client (requesting the download) like:

external storage <-Network/Internet-> ownCloud server <-Network/Internet-> client

where you have a lot additional overhead for the network connection. I think there is also additional overhead from ownCloud side due to the use of PHP, database queries, file versions / checksums etc. which is probably also lowering the transfer speed.

Comparing the transfer speed of ownCloud to a protocol purely implemented for file transfer like SFTP seems to me not possible / comparable.