Slow network SCP, SAMBA, RSYNC copy on rockpi 4

Hi guys,

I’m playing with the Rockpi 4b and tried to setup a NAS. I plugged a 4Tb usb 3 hardrive. I thought having issues with the hardrive Post here. the hardrive has 100mbps+ on internal copy test, it seems to be a network issue.

I tried samba, rsync, scp and I have 12mbps max when I try to copy.

I thought it was a network bottlneck but I don’t have any issues with a windows 10 shared directories.
I check also on processing issues but smb for example use 52% of one core when I copy.

Does anyone know where to investigate as I’m not an expert on networking optimisation.

cheers

Hi gilloub, I guess the network performance depends on many factors.
In the first place it depends on the components involved in your use case.
I tested the network speed of my RockPi 4B with iperf3.
You can install it with sudo apt install iperf3.

The components involved are:

  • FritzBox 7560 router with GBit LAN connectors
  • BananaPro with GBit LAN and running Armbian
  • RockPi 4B with GBit LAN also running Armbian

Everything connected via network cable. WIFI would produce different results.

Start iperf3 as server on RockPi:

iperf3 -s

Start iperf3 as client on BananaPro:

iperf3 -c 172.22.3.40

Results:

[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   708 MBytes   594 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   705 MBytes   591 Mbits/sec                  receiver

For reference, I add this result from my Raspberrypi 3 which only supports 100 MBit LAN:

[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   112 MBytes  94.2 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   112 MBytes  94.2 Mbits/sec                  receiver

The results of course depend a lot on what other network components might cause traffic and what else is running on the tested components. In my case I think they were idle and the other network load was neglectable.

I think in your configuration, the bottleneck is the BananaPro or your GbE switch to wire drops a lot. For rockpi4 with a x86 pc, the speed should be higher than 900 Mbits/s, around 940 Mbits/s.

are you connecting the wifi at the same time?

Thanks @jack for the hint!
WIFI was not connected.
Actually, I wanted to show that the Ethernet performance of the RockPi is reasonably good :slight_smile:
I didn’t mean to complain about the ~600 MBits/sec.
However, you are right that it is not reaching close to the theoretical limit of 1 GBits/sec.
I need to check if I can repeat the test with a PC or Laptop on GbE.

Thanks guys, really practical the iperf3 command line.
Did some test (wifi and ethernet) I have only 100mbps it’s mainly a network issue on my side. my usb to ethernet adapter was in fact 100mbps (thanks apple). I’ll do some test with a thunderbolt adapter.

@jack
I tested the network performance between a laptop with GbE and the RockPi.
Results are exactly as predicted by you:

[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  1.09 GBytes   940 Mbits/sec                  receiver

Nice :+1:

1 Like

I did some benches on the PI via TheRemote/ PiBenchmarks

iozone for random read/writes is also a good test for direct access.

wget the iozone version http://ftp.us.debian.org/debian/pool/non-free/i/iozone3/
dpkg --install iozone-ver

That way you can test i/o before the network level is introduced.
https://www.thegeekstuff.com/2011/05/iozone-examples/

With the pi script which might take a small amount of molesting to remove the raspberry specifics if needed gave me this with a integral 120gb ssd on a pi3A+

HDParm Disk Read 28.43 MB/s
HDParm Cached Disk Read 27.62 MB/s
DD Disk Write 34.4 MB/s
FIO 4k random read 2250 IOPS (9002 KB/s)
FIO 4k random write 3370 IOPS (13482 KB/s)
IOZone 4k read 10139 KB/s
IOZone 4k write 9627 KB/s
IOZone 4k random read 8409 KB/s
IOZone 4k random write 10128 KB/s

                      Score: 2326

Here is the best an A1 SD card would do.
Category Test Result
HDParm Disk Read 22.05 MB/s
HDParm Cached Disk Read 22.06 MB/s
DD Disk Write 19.0 MB/s
FIO 4k random read 2453 IOPS (9813 KB/s)
FIO 4k random write 845 IOPS (3381 KB/s)
IOZone 4k read 8388 KB/s
IOZone 4k write 2731 KB/s
IOZone 4k random read 8238 KB/s
IOZone 4k random write 3855 KB/s

                      Score: 1203