Too slow for school

Here is my setup:

I have a raspberry pi in the US running with an external hard drive attached. I get 150 down and 10 up with my ISP. I am in Thailand currently and have MacBook with external drive. My speeds vary but average 150 down 50 up most of the time. (Believe it or not this cost about $6 bucks a month in Thailand!)

I have some very large video files 25gb and maybe more I would like to sync.

Everything connects fine and my files seem to sync very very slowly. If I leave on for days, one file my sync.

Alternately I can vpn to my pi in the states and sync that way although I see no change in speed.

What can I do to increase the speed if anything?

What info can I provide to help with suggestions to better optimize my speed?

Thanks for any help for this newbie.

Which model of the Raspberry Pi?

Which direction is the sync going?

3 B+.

Sync from MacBook to Pi

It’s generally not possible to answer why-is-it-slow-questions like this from the outside. You need to figure out what the bottleneck is. Is it CPU, disk I/O, RAM, network? On either side. Is the connection direct or via relay, using QUIC or TCP? Are there any errors in the log on either side?

Recapping…

  • Raspberry Pi 3 Model B+
  • External hard drive

Like its predecessor, the RPi 3 B+ has a single USB 2.0 bus. Although the RJ-45 port supports gigabit Ethernet, it’s capped at 300 Mbit/s. Another caveat is that the RJ-45 port is actually an embedded USB-to-Ethernet adapter, so it shares the same USB bus as the 4 onboard USB ports.

Broadcom’s USB chip is also a hybrid combination of hardware plus software (i.e., portions of the USB functions are implemented in the Linux driver). USB 2.0 in theory maxes out at 480 Mbit/s, but actual speeds will vary significantly depending on CPU load, how many USB ports are in use, wired or wireless network connection, etc.

Okay, so max transfer speed is 50Mbit/s = 6.25MB/s (based on the uplink speed on the MacBook side) before overhead and latency are factored in.

That works out to just over 1 hour per 25GB under perfect conditions, but realistically 50% or less of that at best.

Yes! This is what I am here to learn/figure out! So if I am just in the wild it seems I am on a relay. If I vpn into my raspberry Pi then I am on TCP. (I do not see a noticeable difference in speed either way.) I so no errors in the logs but not sure what I am looking for. Nothing checked in debug.

This is great info. So my pi is only Ethernet attached to a router. Only the usb external drive attached. (I do not have usb port on my Mac so have to use an adapter.)

I would be stoked to get 50% of 25gb/hr! Can you break down the numbers? 000 kbps (0.00 Mib). I am trying to better understand my rates.

It is running through my router on the pi side with Nat.

The MacBook should have no problem maxing out the 50 Mbit/s of upload bandwidth available for your internet connection in Thailand.

Unfortunately, things aren’t quite as simple on the Raspberry Pi side. As I previously mentioned, the Ethernet port on the RPi 3 B+ is technically an embedded USB-to-Ethernet adapter. It means that the external USB HDD and the router are sharing a single serial bus on the RPi 3 B+ (think of it like a single pipe feeding multiple faucets).

So the faster the Ethernet interface can transfer data, the less bandwidth is left over for the USB HDD, and vice versa. Or in other words, whichever one goes faster makes the other one go slower.

At the moment there’s only enough information to estimate the upper limits under perfect conditions and without considering any overhead or other potential issues in the entire data path.

There’s much more to network transfer speed than raw bandwidth. For example, high network latency can easily drag down effective transfer rates.

The first step is to test the real world speed of your internet connection in Thailand:

  1. On your MacBook, go to Speedtest (https://speedtest.net/).
  2. Click the “Change Server” link and select a location that’s as close as possible to where your RPi 3 B+ is in the U.S.
  3. Run the speed test and note the results for the upload/download speeds and ping time.

For more clues as to where the bottlenecks are, you’ll have to use a combination of diagnostic tools, starting with one called iperf3 (https://software.es.net/iperf/).

Unless your RPi is running something other than Linux, installing iperf3 is just one command: sudo apt-get install iperf3. For macOS, see the directions on the iperf3 website.

Other handy diagnostic tools include:

  • hdparm – storage device benchmarking tool
  • htop – monitor CPU and memory usage
  • iftop – monitor network bandwidth usage

For what it’s worth, I used to run Syncthing on a Pi2 and the network speeds (local!) to my USB drive were at most about 2MiBs/s, even when using other (non-crypto) technologies, which was the main reason to move away from the pi (great piece of hardware, until you try to run USB and LAN at the same time) onto another board.

It could be me, but I am having a hard time to understand how slow your transfer speeds are…

Yup, plus the 1GB of RAM on the RPi 2 and 3 B+ requires selecting the OS and configuration carefully so that Syncthing has adequate system resources.

The RPi 4/400 with a quad-core CPU, 1 to 8 GB of RAM, dedicated gigabit Ethernet, USB 3.0 and so on is a much better fit with Syncthing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.