How to diagnose local network speed issues?

0

1

I recently bought an ethernet cable for home networking expecting it to significantly boost file transfer speed between my computer and a network hard drive made available via samba. It's a little bit faster, but it still seems pretty slow. iStat Menus is telling me I'm averaging a bit over 3 MB/s (3 MegaBytes/second, so about 24 Mb/s).

Here's the setup and the theoretical speeds:

Harddrive (6 Gb/s) -> Enclosure with USB 2.0 (480 Mb/s) -> Hfs+ mounted to Raspberry Pi 3 through usb2.0 (480 Mb/s?) -> Samba network drive via RetroPie (480 Mb/s?) -> 10/100 Ethernet (100 Mb/s?) -> Netgear wndr3400 (100 Mb/s? out of 300 Mb/s?) -> Cat 7 Ethernet Cable (100 Mb/s? out of 10,000 Mb/s?) -> Ethernet Usb C dongle (100 Mb/s? out of 1,000 Mb/s?) -> Usb C drive on 2016 macbook pro (100 Mb/s? out of 40,000 Mb/s?)

Theoretically, I should be getting speeds of about 12 Megabytes/s (100 Mb/s), but I'm only getting a quarter of that. My weakest links are pretty obviously the rapsberry pi and the router, but I'd really like to test the speed at each connection point as an exercise.

I expected to find some sort of wikipedia for speed tests, but I haven't been able to find one. Are there any guides out there for how to test each link in a networking chain? I realize there's a ton of variability in what sits on any particular persons network, but there are a discrete number of links, so I was hoping there would be a place were I could find out how to test each particular link. All of the search results I'm getting about "testing network speeds" are about testing the end to end results, not diagnosing bottlenecks.

Loktopus

Posted 2018-11-17T22:21:35.223

Reputation: 177

3iperf to test plain network speed. Use ftp transfer of big continuous file to test network speed + writing to NAS drive. Small files will slow down transfers. If you got acceptable speed over ftp then tweak samba settings to improve throughput. Cables very rarely improving speed, it is either working or not. Upgrade to gigabit network, it will benefit throughput even with devices that can talk only on 100Mbit – Alex – 2018-11-17T22:34:54.663

@Alex Thanks for the suggestion, iperf is giving me some good info. I'm getting speeds that make a lot more sense now. – Loktopus – 2018-11-18T18:36:56.643

Answers

0

I often connect to my network via wifi before plugging in the ethernet cable, and the network drive connection must have been established over the wifi connection; if I turn off wifi, iperf says my speed is about ~94 Mbits/sec, which is in line with what it should be. If I do a file transfer from the samba drive, I get about the same speed.

iperf is a pretty cool tool, definitely helped. While it's not exactly what I was looking for, it ruled out samba and the raspberry pi connection as possible causes. I'm still unsure of how I'd be able to test throughput on hardware specifically if I needed/wanted to. For example, it would be cool if there's a way I could test ONLY the connection between a router and a machine (and not between machines), or ONLY the throughput of a cable, or ONLY the performance of a dongle.

I'm guessing I've had trouble finding a guide how to test each specific link because it's often easy enough to use a process of elimination via tools like iperf, and most people don't bother actually testing the specific hardware/software links along a connection in isolation.

Loktopus

Posted 2018-11-17T22:21:35.223

Reputation: 177

0

I disagree that the weakest link is the Raspberry Pi or the router.

I bet it's really the hard drive at the beginning of the chain. Your link goes to a 5400 RPM hard drive. The most that HDD would ever do is 1 Gbps rather than the 6 Gbps interface speed of SATA III. And that's assuming you're doing a sequential data transfer. If the drive is fragmented or you're transferring smaller files, the speed will drop much lower, as shown in this benchmark of the drive.

In fact, the speed of the 4 KB benchmark matches the speed you're getting pretty closely. So, the first thing I would test would be the drive. I would run a storage benchmark on it, like Crystal Disk Mark, and also check the drive for fragmentation. Consider upgrading to an SSD or implementing a RAID.

Richard Maxwell

Posted 2018-11-17T22:21:35.223

Reputation: 1

If I plug the harddrive directly into my laptop via that same enclosure and a usb dongle I can copy a 1.6 Gb file in like 5 seconds (don't remember exactly how fast it ended up being off the top of my head, but it's WAY faster). Same file when copied via the network takes minutes. Definitely not the harddrive or the enclosure. – Loktopus – 2018-11-18T16:51:05.373