2

I have a Raspberry Pi Zero W. Using LibreELEC I was able to transfer ~1mbs via ssh and samba. Using Raspbian Jessie Lite I got the same. Using wget to grab an ISO on the internet I was able to get 1.5mb/s (which is my current internet speed). When using wget http://192.x.x.x/file I was able to get the same speed (seems like a router issue now). On windows and linux (using iwconfig) I see my link speed is well over 10mb/s.

How do I improve ssh to get 1.5mb/s like wget? How do I raise that speed (I think it may be a router issue). How do I test speeds without a router? (I guess setting my windows machine as a adhoc network is most simple controlling the pi via ssh on my laptop)

1

First, make sure you're also keeping an eye on the other areas where things might be limiting your speed. You need to watch the CPU usage when you're doing the tests an ensure that's not maxing out, though that's unlikely at these kinds of speeds. You are also doing tests that involve writing to disk and are more likely to run into limits there. My Zero W with a fast SD card (Samsung Evo+) maxes out sequential writes at 6-8 MB/sec; you can get a quick estimate of yours with dd conv=fsync if=/dev/zero of=testfile bs=1M count=50. But if your intended application doesn't need to write the data to the disk, testing with a program such as netperf may be a better approach.

To test SSH without writing the disk you could use a command such as ssh -o compression=no remotehost dd if=/dev/zero bs=1M count=20 | dd of=/dev/null bs=1m. Note that I explicitly disabled compression on SSH to make sure we're actually transferring that amount of data.

It sounds as if you have a local Linux PC on your network (that I presume is a fairly fast "real" PC as opposed to another Pi); that would be a good host to use for testing locally, without going through your router. If you don't have that, I would grab a Debian Live image and boot that on your Windows box. It won't touch your harddrive and you'll be able to install and use the same networking tools there as you do in Raspbian.

  • Doing the suggest ssh command I got 241 kB/s and 182 kB/s. That sound's pretty shitty. On my pi2 which uses ethernet I know I got > 1mbps ssh speed. I tried making a adhoc windows network but it didn't seem to work. I tried doing it with ubuntu on my vm (with a wifi card attached) and it didn't seem to work. So I used my laptop. From my laptop to PC I was able to get > 1mbps but I saw a lot of stuttering. Maybe it's because it's channel 1 and my neighboor has his wifi on channel 1 (IDK how to change channels and trying via command line was over complicated). – user65873 Apr 21 '17 at 2:23
  • I'm not sure what I'm going to do but for now I suspect I'll just put up with the slow speeds, transfer via http+nginx+wget instead of ssh when I can and physically attach my drive if I need to do a lot of file manipulation/browsing. – user65873 Apr 21 '17 at 2:25
  • When you do that ssh/dd command (ssh -o compression=no remotehost dd if=/dev/zero bs=1M count=20 | dd of=/dev/null bs=1m) what speeds do you get? – user65873 Apr 21 '17 at 2:26
  • What was the CPU usage while you were doing that SSH test? That's really important; it might be the SSH crypto that's hurting you. I can't tell you what speeds I get on my Pi Zero W since I'm away from it at the moment, but I'll let you know later. On a powerful (Intel i7) desktop machine I get well over 400 MB/sec, ssh'ing to 127.0.0.1. – Curt J. Sampson Apr 21 '17 at 2:54
  • Let me know. CPU usage changes depending on if I'm using USB or USB+LUKS (I have work info on that drive). However both had same speeds during transfer – user65873 Apr 21 '17 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy