3
  1. I'm running speed tests on raspberypi 3 b+ (gigabit ethernet interface).

  2. I've tested with ethtool from the terminal, and it shows

    Speed: 1000Mb/s

Based on this result I assume both the router and the wire support 1000Mbps network transfer speeds.

  1. A HDD is connected to the pi. I've tested it, and found the average writing speed is about 60MB/s.

  2. The files I used in testing are at least 1GB, and my laptop supports gigabit ethernet.

When I transfer files from my laptop to the pi's HDD using WinSCP, the average speed is only around 11MB/s.

Even though the raspberry pi has USB2.0, the speed should be no less than 11MB/s. I think it should be at least 30MB/s or even 50MB/s.

I don't understand why the data isn't moving faster. Can someone explain why I'm getting these results?

4
  • Usb bandwidth is shared amog all devices on the same controller so 11 MBps is quite good, take into account all the packet and USB overhead, plus scp requires memory bandwidth and CPU time for decoding and writing which is shared resource per context and task switch rules (scp will put itself for rescehduling between packets by calling select or read syscall depending if udp or tcp ) . A baremetal webserver implementation may likely hit 30 MB in ideal scenarios, but that is an optimized system
    – crasic
    Sep 23, 2018 at 19:54
  • partially relevant: for a meaningful network performance test I'd recommend Iperf
    – Fabian
    Sep 24, 2018 at 9:34
  • Welcome to Raspberry Pi SE! The system has prompted me to review your question, and offer suggestions that may help you get the answers you're seeking. I've made some minor edits to your question, and beyond that I have two suggestions: Read "How to Ask a Good Question", and consider showing a bit more detail on how you ran your ethtool tests (specifically, the commands and options you used). You may also wish to review the units in your question; specifically Mb/s vs MB/s.
    – Seamus
    Sep 24, 2018 at 20:30
  • 3b+ has "Gigabit Ethernet over USB 2.0 (maximum throughput 300 Mbps)" - raspberry pi website
    – Antoni
    Oct 6, 2021 at 14:37

2 Answers 2

2

There is an HDD connected to the pi. I've tested that the average writing speed of it is about 60MB/s.

This must mean the HDD is USB 3.0 capable, and that you did not do the tests on the Pi, because it is not possible to do 60 MB/s through a USB port on the Pi; the realistic limit of a 2.0 port is ~35 MB/s. But you are already aware of this.

Even though the raspberrypi only has USB2.0, the speed should be no less than 11MB/s. I thnik it should be at least 30MB/s

My experience is that would be an extreme upper bound at least on the Pi, and (even more realistically), expect a little over half that on average.

Which still makes 11 MB/s a little slow, but not outrageously so. My other observation from experience would be that using SSH encryption is a little slower than NFS with no encryption.

When I do use SSH, I almost always use sshfs, not scp. I've read casually that the latter is slower because of how it works, but I wouldn't assert that as fact -- you can do your own reading and tests if you are interested.

3
  • USB2.0 is 480Mbit/s, that equals a theoretical max-speed of around 53MByte/s... Still... I agree with 99% of this answer, since the RPI is underpowered in terms of CPU, and it suffers from a crowded USB-bus.
    – svin83
    Feb 9, 2019 at 6:28
  • "theoretical max" vs. "realistic limit": When I wrote this, that wikipedia link commented somewhat on protocol overhead, evidently someone edited it out....anyway, I've never seen a USB 2.0 device exceed 30 MB/s for long on any equipment under any circumstances. Here's a long discussion: electronics.stackexchange.com/q/24700/52138
    – goldilocks
    Feb 9, 2019 at 12:23
  • Yeah. I'm not arguing, only adding more knowledge ;)
    – svin83
    Feb 11, 2019 at 22:31
1

As goldilocks has stated BOTH the HDD and Ethernet go through the USB2 Hub, which limits speed.

If you want faster transfers (on Pi3/Pi3B+) use the onboard WiFi, which bypasses the Hub. (FTP is also likely to be faster.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.