# How to increase network throughput for a single process/thread



## pbp_jackd (Jan 5, 2022)

I have 1GB file which I want to download from my nextcloud server. Typically the downloads happens with a speed of around 20 Mbytes/s.

If I download the file via scp command I get similar results. However, If I start two instances of scp in parallel, I can observe that I can reach a total throughput of around 35 MBytes/s.

I was wondering what the limitation is and if there is anything I could try to get more throughput if I only have a single process running ?

The boaard itself is a Pine64 RockPro64, with 6 cores and 4 GB RAM. Network is connected via a USB-To-Ethernet adapter.


----------



## covacat (Jan 5, 2022)

try to find out what is the limiting factor
cpu from / encryption or compression ?
network latency ?
i don't know about that board specifically but arm boards usually have slow disk io (sdcard) so this can be another limiting factor

if cpu is the bottleneck try a lighter cipher, disable compression if its worth
if network latency is the problem try to increase net.inet.tcp.recvbuf_max
for both you can use something like this
https://gist.github.com/rcoup/5358786 (or find a port that can do parallel downloads (ftp/lftp?)


----------



## hardworkingnewbie (Jan 5, 2022)

Why are you not using the on board ethernet?


----------



## pbp_jackd (Jan 5, 2022)

hardworkingnewbie said:


> Why are you not using the on board ethernet?


I would love to but I can not get Gigabit to work with the dwc NIC. It works if I attach the board to a 100 MBit switch but fails to obtain an IP if attached to a Gigabit switch.

Haven't checked lately but I think to remember the issue was also discussed in the arm mailing list. However, as far as I can recall the problem was just the opposite to mine. PPl. had some success when attached to a Gigabit switch but did not get an IP when connected to the 100MBit switch.


----------

