Slow Upload Speed - How Do I Tweak It?

Hi

I experience slow upload speed when uploading large files from a browser. The speed is very slow when http2 is enabled - it is better with just http1.1 - but could still be better. Is there some tweaking I could to do to improve the speed?

Nextcloud version (eg, 20.0.5): 24.0.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.4 LTS
Apache or nginx version: Apache 2.4.41
PHP version (eg, 7.4): PHP 8.1.6

The output of your Nextcloud log in Admin > Logging:

https://pastebin.com/TQQwHGdc

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

<?php
$CONFIG = array (
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'trusted_domains' => 
  array (
    0 => 'REDACTED',
    1 => 'REDACTED',
  ),
  'datadirectory' => '/home/nextclouddata',
  'dbtype' => 'mysql',
  'version' => '24.0.1.1',
  'overwrite.cli.url' => 'REDACTED',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'REDACTED',
  'installed' => true,
  'instanceid' => 'REDACTED',
  'htaccess.RewriteBase' => '/',
  'maintenance' => false,
  'loglevel' => 1,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'REDACTED',
  'mail_from_address' => 'REDACTED',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'REDACTED',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'REDACTED',
  'mail_smtppassword' => 'REDACTED',
  'theme' => '',
  'default_language' => 'da',
  'default_locale' => 'da_DK',
  'default_phone_region' => 'DK',
  'memcache.local' => '\OC\Memcache\Redis',
  'memcache.locking' => '\OC\Memcache\Redis',
  'memcache.distributed' => '\OC\Memcache\Redis',
  'redis' => [
        'host' => 'localhost', // can also be a unix domain socket: '/tmp/redis.sock'
        'port' => 6379,
        'timeout' => 0.0,
        'read_timeout' => 0.0,
        'user' =>  '', // Optional, if not defined no password will be used.
        'password' => '', // Optional, if not defined no password will be used.
        'dbindex' => 0, // Optional, if undefined SELECT will not run and will use Redis Server's default DB Index.		
  ]
);

The output of your Apache/nginx/system log in /var/log/____:

Apache error log (notice installed Redis - so some of the errors are fixed) https://pastebin.com/3QFUwk35

JSON: External Monitoring:

https://pastebin.com/PdqC8u5N

For nginx, they added some hints in the documentation recently. Perhaps, you find a similar parameter for apache:

And if you speak about performances, it always good to specify some numbers. Recently someone complained about speed and was (for some parts at least) limited by the network connection speed (Improving the speed of my Nextcloud instance - #6 by bb77).

1 Like

on Single Board Computers with Slow eMMC
mount /media/arquivos/cache
Create a external SSD folder
mkdir /media/arquivos/cache
chmod …
chown …

sudo nano /etc/php/7.4/cli/php.ini
sudo nano /etc/php/7.4/apache2/php.ini

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
; PHP: Description of core php.ini directives - Manual
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; PHP: Description of core php.ini directives - Manual
upload_tmp_dir = /media/arquivos/cache

; Maximum allowed size for uploaded files.
; PHP: Description of core php.ini directives - Manual
upload_max_filesize = 64G

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 9999