Slow upload / download speeds using web (locally getting full speed)

Hai, got a problem with “slow” downloading and uploading through website outside of LAN
whenever i use locally its full speed, around ~95 MB/s but when using outside of my LAN its only 20 MB/s
i tried find a solution, but i couldnt find anything helpfull, does anyone have same issue and found solution how to get full speed via external IP ? Its my first time doing personal cloud

Nextcloud version: 26.0.1
Operating system and version: UNRAID 6.11.5
PHP version: 8.1.18

Is this the first time you’ve seen this error ? Yes

To replicate:

  1. Just finish making NextCloud
  2. Download / upload stuff from external IP and u will see speeds not going highier than 20 MB/s (but from local ~95 MB/s)

nextcloud.log

config.php

If i forgot or missing, ask pls doing it first time

1 Like

Your local (LAN) test sounds like it’s perhaps GigE to GigE.

What is the capacity of the link connecting your NC server to the Internet?

What is the capacity of the Internet link you’re testing from externally (i.e. the one you’re connecting to the NC web interface with)?

For sanity checking, the figures you’ve provided so far are equivalent to:

  • 95 MB/s is about 800 Mb/s
  • 20 MB/s is about 160 Mb/s

Your throughout is going to be a factor of a lot variables, including end to end latency, the Internet router/firewall throughput capability at the side where your server is, the Internet router/firewall throughput capability at the side where your client (workstation) is, and various parameters on the web server hosting NC (assuming all other parameters of the testing are the same like file size and type).

As an aside I noticed you disabled chunking entirely in your provided config.php. That’s a a rather brutal setting, but it can increase throughout (at the cost of transfers failing entirely more often). Just something to follow-up on if that wasn’t intentional.

Yep, locally its GigE to GigE
NC to internet is also 1 Gbps
All are 1 Gbps, i’ve checked it to be sure i have connected to right ports
Externally and internally are 1 Gbps

Yea, and thats the typical results i do have
I dont know if that helps, all routers / modems i own are 1 Gbps, the server i put NC is like 2 meters away 4x 1 Gbps (in unraid all 4 are bonded)
I have tested everything with .zip file 3.3 GB
I disabled chunking to see if results would change, it didnt change, i forgot to enable it again

1 Like

Anyone had same thing then ?

1 Like

Hi @Akrus, have you enabled http2? if yes, disable it and retry your test

@Mageunic HTTP2?? I’m even using HTTP3 nowadays. My download is around 45-49 MB/s (~400 Mbps), which is not that bad, but could be better.

I also have a very fast server, AMD 16 cores (32 threads), 128GB RAM, all NVMe SSDs, cat7 network, both my computer and the server are on the same LAN network. I have optimized PHP, MariaDB and Nginx configurations. My desktop NIC should be the bottleneck, I expect close to 1Gbit/s download, not 400 Mbit/s. So at least twice as fast. (server NIC is 10 Gbit/s btw)

For instance using SFTP between the same systems (my desktop & the server) I do get around 1Gbit/s. So somewhere there is a bottleneck with Nextcloud. I’m not sure where.

Here my iperf results between the two systems, again like I mentioned I expect ~1Gbit/s:

------------------------------------------------------------
Server listening on TCP port 4662
TCP window size:  128 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 192.168.1.42, TCP port 4662
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.1.102 port 37542 connected with 192.168.1.42 port 4662 (MSS=1460)
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-5.0000 sec   567 MBytes   951 Mbits/sec
[  1] 5.0000-10.0000 sec   566 MBytes   950 Mbits/sec
[  1] 10.0000-15.0000 sec   567 MBytes   951 Mbits/sec
[  1] 15.0000-20.0000 sec   565 MBytes   949 Mbits/sec
[  1] 20.0000-25.0000 sec   566 MBytes   950 Mbits/sec
[  1] 25.0000-30.0000 sec   566 MBytes   950 Mbits/sec
[  1] 0.0000-30.0431 sec  3.32 GBytes   949 Mbits/sec

Hi @danger89, have you tried to change the chunk size of uploads? this parameter has a lot of impact on uploading a single big file. By default, it is 20 MB so the upload of your file ( every single file) will be cut into 20 MB upload files and then reassembled when the upload is finished.
Here is the occ command to change the value :
sudo -u www-data php occ config:app:set files max_chunk_size --value 20971520
the value must be calculated like this: 1024*1024*(value in MB)