Slow Frontend, Up- and Download

Regarding the slow frontend, I have already gone through all apps and disabled all unnecessary ones. Unfortunately no success with the speed when loading the frontend.

With owncloud I had no speed problems, speeds of 35 Mbit/s upload were achieved without problems. Since the switch to nextcloud, the upload is just 9.5 Mbit/s.
→ this was a driver problem that had crept in stupidly at the same time, I was thinking it could be a DB problem with some sort of long querys issue.

My server is running:

  • Ubuntu: 20.04.3 LTS
  • Nextcloud: 22.2.0
  • PHP: 8.0.11
  • MariaDB: 10.3.31
  • Apache2: 2.4.41

My Nextcloud config → config/config.php

$CONFIG = array (
  'instanceid' => '***',
  'passwordsalt' => '***',
  'secret' => '***',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '***',
    2 => '***',
    3 => '***',
  'datadirectory' => '***/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '***',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => '***',
  'mysql.utf8mb4' => true,
  'dbuser' => '***',
  'dbpassword' => '***',
  'installed' => true,
  'htaccess.RewriteBase' => '/',
  'maintenance' => false,
  'mail_from_address' => 'noreply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '***',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => '***',
  'mail_smtpport' => '465',
  'mail_smtpname' => '***',
  'mail_smtppassword' => '***',
  'default_phone_region' => 'DE',
  'memcache.local' => '\OC\Memcache\APCu',
  'log_type' => 'file',
  'logtimezone' => 'Europe/Berlin',
  'logfile' => '***/owncloud/data/nextcloud.log',
  'loglevel' => 2,

I changed following in my php.ini → etc/php/8.0/apache2/php.ini

memory_limit = 512M
apc.enable_cl i =1

Please tell me which configuration I still need to post to effectively address the problem.

to increase the probability, the question is asked exactly the same way again in stackoverflow.

Why do you not use the default PHP installation from Ubuntu 20.04. LTS?

Ubuntu – Informationen über Paket php in focal

I had to change the PHP version once because the owncloud to nextcloud migration script ( checks the version of owncloud and the compatible nextcloud version but not whether the nextcloud is compatible with the installed php. If I remember correctly, the nextcloud version was then 12.x.x and that needed php 7.2. Then I had to change it manually after that I updated to the last nextcloud version and also the last php version, because I no longer knew what the default version has been I used the latest one.

I will try again with php 7.4.

I’d consider using redis for the locking to take that load from the database (especially when handling a lot of files).

During you wait time, try to find out which process is limited (also: io-wait). Slow-query logs can be interesting if it is the database. In php, perhaps more memory or more processes can help, but in this case you should find hints in your logs.

If you are a developer, you might be able to check in more detail the difference of the code and which part is faster in ownCloud. As normal user that is rather difficult, you could perhaps just disable and enable certain functions and compare the impact (if there is any).

I had hoped for a simpler solution but I will look at the source code as soon as I find time and put something together myself. I will check the db querys and will report my result here