Speed improvements

Hi there,
i ve just set up my new nextcloudserver on my dell T20 server.
i gave it 2 of the 4 CPUs and 2.5 GB of RAM.
Also i have solved all the problems like memcache and php-settings so far.
At least the nextcloud doesn’t cry about it anymore, so i guess they should work.
But still the upload speed is very slow with approximatly 1.4 Mbit/sec.

Are there settings i can change to get the speed up?
I dont think its the ressources, because CPU and RAM are still quite bored acording to htop and nextcloud itself.

the server OS is ubuntu 18.04 LTS

how can i give you some config files? if i try to quote some in my post it simes to mess with the format of the text.

thanks so far


Did you tried to check your network speed?

To post code use this:

paste your code here

This looks like:

paste your code here

Hi JohnWalker,

thanks for the hint.
Yes i checked my networkspeed.
The server is in my LAN so it should have gigabit connectivity.
I send one big file to the server on a network-share folder and it got there with around 100 MB/s according win-explorer. So i think that is ok.

nextcloud config.php:

$CONFIG = array (
  'maintenance' => false,
  'trusted_domains' => array (
    0 => 'some IP',
  'datadirectory' => '/var/www/html/nextcloud/data',
  'overwrite.cli.url' => 'http://some IP/nextcloud',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '?Abc1234',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcached_servers' => array(
     array('localhost', 11211),
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => array(
      'host' => 'localhost',
      'port' => 6379,

I changed some things here but they didn’t improve speed that much.
The redis seems to work i think, at least it sometimes says that a file is locked, but they seem to get unlocked, at least the database oc_file_locked is empty.
I found some mysql hints to speed it up but it always says it cant find the variable

innodb_buffer_pool_size = 512M

i wanted to set it to 512 MB because RAM is 2.5 available so it should be ok, and if needed i could have increased it further, but it doesnt work.

1 Like

Hi jbnext,
if file locking doesn’t work, you normally can see this in the log. There you also can see if APCu doesn’t work correctly.

In my opinion, it looks like an caching problem.
Did you checked the Nextcloud Administration Manual > Configuring memory caching ? There you can find a lot of informations.

Do you run a single-server setup? (Recommendation in Manual)
I use APCu for local caching and Redis for file locking (over Unix socket) on a single-server and get good results:

  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'dbindex' => 0,
    'timeout' => 1.5,

Hi JohnWalker,

yes its a single-server setup.
i will check if your settings work for me this afternoon.

Thanks so far


Also, make sure, that the temp space, where php temporarily uploads it’s files to, is on a fast drive. I don’t know the T20, but usually this is placed in /tmp and if your server utilized a flash disk (aka Sata DOM), you might experience these speed issues when uploading. Note, that downloading would then be way faster, since this issue only affects the upload speed.

Also, the temp space must be able to acommodate at least the maximum allowed upload size set in NC.

@jbnext hi, could you provide the output of top during an upload here. at least the header lines. to check if you have a high cpu load, wait i/o or paging on your server.

thats a screenshot from htop while it was syncronising
it seems pretty board
@budy i have installed it on an ssd, so it should be fast enough.
@JohnWalker: i tried the settings you posted, but it doesnt change anything for me

Ok, never minde
i think i have just messed to much with the settings probably.
i will install it just another time with another tutorial

@jbnext no need to follow a tutorial:

but use the devel branch. more features. more options.