3

I have a raspberry pi that I use as a router, the configuration is basically as follows :

  • Raspberry Pi Zero with raspbian (latest 4.4 kernel)
  • USB 3.0 HUB with 4 ports connected to the main micro USB port
  • WiFi Network Adapter (wlan0) configured as AP (hostapd) (chip RT5572N)
  • WiFi Network Adapter (wlan1) client of another AP (ISP router) to get internet connection

The problem is that while the connection to the internet on the Pi is very fast and I can get 30 Mbps, same as the internet connection uplink, so that I can download a file at roughly 3.0 MB/s; the internal network is not so fast and when I try to download a file from the wifi network created by the Pi I basically get only 1.0 MB/s downloading the same file from the internet(it is actually the maximum speed I can get) .

I've performed some test on the internal Wi-Fi network created by the Pi and the average speed downloading or uploading a file from a PC to the Pi through SSH is around 2.5 MB/s therefore slow. The chip inside the AP wifi adapter is RT5572N.

Is the speed that I'm getting on the internal network acceptable or should I get more ? Is there a way (some kernel or hostapd configuration) to increase the performance of the internal network ?


Note

Since the USB 2 is potentially 480 MBt/s, even in the case we say that we have just half the speed and we go to 240 MB/s, since I have connected only two adapters to the usb hub, each adapter should have a potential bandwidth of 120 MBs, while here I'm not even getting 60 MB/s of bandwidth to each adapter ... Should we define this normal ? Why ?

2
  • 1
    I've edited some of the units here (hopefully correctly) since your use of 'b' to indicate both bits (b) and bytes (B) is confusing. One thing you have failed to take into account is that your adapters probably have a top speed of 150 Mbps, i.e., ~19 MB/s, and the realistic norm will be half that. That is the base bottleneck, meaning 60 MB/s is very impossible.
    – goldilocks
    Feb 4, 2016 at 17:16
  • did you try setting non overlapping wifi channels for each adaptr? metageek.com/training/resources/why-channels-1-6-11.html , might be interference. Also raspberry pis are not famous for being good routing machines.
    – Mehdi
    Jun 21, 2019 at 10:48

1 Answer 1

5

You are getting perfectly normal results in my experience. Remember that you are working on a USB port here, having it in USB3 doesn't do much. Both wifi adapters have to share the bus as well.

5
  • Isn't the USB2 speed up to 480MBs? so even in the case we say that we have just half the speed and we go to 240Mbs, since I have connected only two adapters to the usb hub, each adapter should have a potential bandwidth of 120Mbs, while here I'm not even getting 60Mbs of bandwidth to each adapter ... Should we define this normal ? Why ?
    – aleroot
    Feb 4, 2016 at 11:14
  • 1
    Lots of overhead for starters. Something like 10-15% of a USB2 connection is lost to overhead. If the file system of your PC is different to that of your pi, there's conversion time involved. Also, your numbers are theoretical maximums - I wouldn't expect a 15 quid device to have been finely honed by the greatest craftsmen in the land to eliminate all traces of imperfection.
    – goobering
    Feb 4, 2016 at 11:42
  • So, an overhead of 10-15% can cause the fact to have less bandwidth than 60Mbs for just two device ? There is something that I don't understand here ... Honestly I don't pretend to have built an high performance router but not being capable of handling properly a 30Mbs connection, so basically something like 80Ms in total (up+down) does't seem to be normal to me ...
    – aleroot
    Feb 4, 2016 at 12:03
  • 1
    Also take into account that you have 2 wifi antennas next to each other, potentially throwing packets into each other's faces. Do not forget: you are using a little teenie-weenie ARM processor also helping you further bottleneck the processing.
    – Havnar
    Feb 4, 2016 at 12:07
  • Also see: superuser.com/q/317217 for some more suggestions. USB 2 is only half duplex, flash memory bottlenecks, etc etc etc.
    – goobering
    Feb 4, 2016 at 13:14

Your Answer

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

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