Is this normal speed?

Hello all,

This is more of a discussion than a support question. Hopefully it is okay to post this here. I posted this in Google+ as well, but I wasn’t sure which was more active. I figured I’ll probably get a response here faster than Google+.

I have been using Nextcloud for almost a year now and am happy with it. However, I feel like the download speed is not as fast as it should be. My Nextcloud server runs as a VM on a 2012 Hyper V host. It has 4 processor cores and 4 GB RAM. It is a Ubuntu 16.10 server with MariaDB, PHP7, Ngingx (HTTP2) and Nextcloud version 11.03 (Production). The data gets downloaded and uploaded to external storage via SMB (I have a Freenas box serving my SMB shares).

When I download from windows directly from the SMB shares, I get about 100 + MB per second, but when I do the same through Nextcloud, I get about 7-9 MB per second. This is done internal on 1 Gig network. From outside the home, I get about 4-6 MB per second. I have tested it on a Gigabit connection and it is about the same.

Is that normal for a server of this specs?

Thanks in advance.

First of all, you should upgrade to ubuntu 17.04, since 16.10 is EOL this Month.

Otherwise remote diagnosis of such systems are quite complicated from remote, sice there are many parts involved.

In my experience using remote storage is never really fast. If you need to use it (and cant just mount an NFS directory as the local nextcoud data dir ) look for slow access to the nextcloud file_cache (use the mysql slow_log for this).

Except from the general tuning tips (modern php version, latest NC) i would recommend to use some profiling tool to see what part of the whole chain slows you down the most.

As @rtznprmpftl mentioned network storage is a big issue since you are now traversing two machines. Another thing is that the data is being served via PHP which is way slower than with Apache which is written in C

Thanks for the info about 16.10’s EOL date. I am upgrading it now. I can’t use NFS because the shares are used by windows machines and it causes permission errors.

As for the profiling tool, I have heard of iperf but that will only help with checking the throughput from Ubuntu box to the storage server. Do you know of any tool/s that I can use?

Can you please explain the last part of your comment about data being served by PHP compared to Apache?

Well, your apache can’t access your data on NFS right? So it has to be downloaded and buffered with PHP and then served to your browser. That’s slow

Its been a long time since i profield PHP Applications, so maybe i am not up to the latest stuff, but basically you can generate a profile with xdebug (https://xdebug.org/) and look at it with kcachegrind.

And, to answer for BernhardPosselt,
in your setup the file has to be downloaded over smb by nextcloud an then has to be served from memory to nginx which delivers the file to the enduser, which introduces a lot of indirections.

@BernhardPosselt @rtznprmpftl, thank you guys for explaining it.

I will look into creating the profile and see if I can figure this out. It is a big drop in speed from a SMB system that is capable of 100+ MB transfer speed. Maybe moving the nextcloud server to a SSD will make the performance better.

I encoutering similar issues, did SSD solved your problem?

I would advise upgrading to 18.04 LTS and staying with the long-term support version unless there is some reason to upgrade further.

As to your issue, I would take a different approach and test each leg of the connection individually to narrow down the issue, e.g. mount SMB from your Nextcloud server and test download to it, also test a Nextcloud download that isn’t from external storage, etc.

1 Like

Unlikely. If you have enough RAM and set up caching correctly, this shouldn’t be influenced by the disk speed. I’d rather care about the server->smb backend (like @KarlF12 already mentioned) goes down to 100 Mbit/s. You can monitor your server and check if your i/o performance is limiting you.

I will rebuild all from zero this time i try to use Nginx instead apache.
and for now i didn’t success yet with Nginx i guess i misunderstood some parameters.

About the ressource allowed to my previous nextcloud on a virtual machine it has.
4 core at 3.2ghz from a I3930K and 8Go Ram.