FireFart
Posts: 4
Joined: Mon Jan 23, 2017 2:56 pm

Slow Download Speed using Gigabit Adapter

Mon Jan 23, 2017 3:15 pm

Hey guys,
I'm currently trying to set up a speedtest using https://github.com/sivel/speedtest-cli on my Raspberry Pi 3. As my internet connection is faster than the internal Ethernet Interface (around 150Mbps) I use an external USB3 Gigabit Ethernet adapter.

Basically it works but the speed using wget or speedtest-cli is only around 50-70Mbps. If I test the speed using iperf and another device on the network i get around 200Mbps which is the same as others are seeing: https://www.jeffgeerling.com/blogs/jeff ... networking . When doing the speedtest on the same network on a PC it always gets to 150mbps so it's no connection problem.

So the adapter can handle the speed but something is throttling the speed using speedtest-cli. My suggestion is some kernel parameters are interfering the connection via the USB adapter.

Anyone has an idea what could be the problem here?

My setup:
OS: Raspbian Jessie

config.txt

Code: Select all

dtparam=audio=off
dtparam=uart0=off
dtparam=uart1=off
dtoverlay=pi3-disable-bt
dtoverlay=pi3-disable-wifi
gpu_mem=16
enable_uart=0
/etc/modprobe.d/raspi-blacklist.conf

Code: Select all

# wifi
blacklist brcmfmac
blacklist brcmutil
blacklist cfg80211

# bt
blacklist btbcm
blacklist hci_uart

# internal network
blacklist smsc95xx

# sound
blacklist snd_bcm2835

# ipv6
blacklist ipv6

# gpio
blacklist bcm2835_gpiomem

# misc
blacklist bcm2835_wdt
blacklist uio_pdrv_genirq
blacklist i2c_dev
The only loaded kernel module left is ax88179_178a, which is my external USB Gigabit adapter.

Code: Select all

[email protected]:/# ethtool eth1
Settings for eth1:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 3
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pg
        Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

Code: Select all

[email protected]:/# lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 2: Dev 4, If 0, Class=Vendor Specific Class, Driver=ax88179_178a, 480M
To test:

Code: Select all

mkdir /root/ramdisk/
mount -t tmpfs -o size=100M tmpfs /root/ramdisk/
cd /root/ramdisk
git clone https://github.com/sivel/speedtest-cli.git
cd speedtest-cli
./speedtest.py
Thanks!

tech-mech
Posts: 114
Joined: Sun Feb 23, 2014 9:51 pm
Location: Portland, Oregon USA
Contact: Yahoo Messenger

Re: Slow Download Speed using Gigabit Adapter

Tue Jan 24, 2017 3:38 am

I am not a geek and do not know how fast the RPI can go but I wonder, do you know that it is a USB 2 device and that all 4 of the port go to 1 port on the SoC?

The RPi is fine just the way it is in my opinion and many others. It does what it was designed to do and much more so if it is not fast enough get something else.

One thing the RPi has over all the other 'better' single board computers is the community. It can't be beat.

Dale

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Slow Download Speed using Gigabit Adapter

Tue Jan 24, 2017 7:22 am

FireFart wrote:Hey guys,
I'm currently trying to set up a speedtest using https://github.com/sivel/speedtest-cli on my Raspberry Pi 3. As my internet connection is faster than the internal Ethernet Interface (around 150Mbps) I use an external USB3 Gigabit Ethernet adapter.

Basically it works but the speed using wget or speedtest-cli is only around 50-70Mbps. If I test the speed using iperf and another device on the network i get around 200Mbps which is the same as others are seeing:
Thanks!
Remember that things like speedtest-cli and wget will be dependant on the external servers as well as what you're Pi can achieve.

Testing fast connections on speedtest.net in the past I've found the results can be variable depending on which server you connect to and what else is happening at that time on that server. The same can be true of wget.

However if you've found that iperf to the local lan can manage 200Mbps then that would suggest the Pi and it's network adaptor are working fine. The only Pi related setting to possibly check is the MTU it's configured with - although I suspect that wouldn't make that much of a difference.

User avatar
RaTTuS
Posts: 10459
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Slow Download Speed using Gigabit Adapter

Tue Jan 24, 2017 9:22 am

how fast is your internet link ?
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

FireFart
Posts: 4
Joined: Mon Jan 23, 2017 2:56 pm

Re: Slow Download Speed using Gigabit Adapter

Tue Jan 24, 2017 7:33 pm

Yeah I know about the shared USB bus and the speed limitations but as iperf shows around 200Mbps the adapter (and the pi) is capable of handling this amount of traffic.

My internet connection is currently 150Mbps. If I run the speedtest from another PC on the network using the same server id I get around 140Mbps, when running on the Pi it's currently around 50Mbps. If I switch over to the Pi's internal interface the speed goes up to around 95Mbps (so 95% of the available interface bandwidth).

So either it has something to do with the driver or some kernel parameters need some tweaking :/

User avatar
Randomp
Posts: 25
Joined: Wed Jun 26, 2013 8:05 pm

Re: Slow Download Speed using Gigabit Adapter

Mon Mar 20, 2017 8:29 am

I have noticed this issue as well using a gigabit adapter. My download speeds are significantly slower than usual (using the built-in 100mbit ethernet port).

I have a 25mbit connection from my ISP, which is pretty abysmal, but gets the job done for me. I used to be able to max it out even on my pi, but now it seems to only be able to download at a rate of 1 megabyte max, which is about 10mbit. Something isn't right because my local LAN transfer rate has almost doubled when copying files from the Pi to a PC via ethernet.
RPiB, RPi2B, RPi0, RPi3B, RPi3B+, RPi4B2Gb, RPi4B4Gb :D

User avatar
RaTTuS
Posts: 10459
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Slow Download Speed using Gigabit Adapter

Mon Mar 20, 2017 8:35 am

what are you saving tyhe files to ? is it a slow usb device
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
Randomp
Posts: 25
Joined: Wed Jun 26, 2013 8:05 pm

Re: Slow Download Speed using Gigabit Adapter

Mon Mar 20, 2017 8:39 am

RaTTuS wrote:what are you saving tyhe files to ? is it a slow usb device
In my case, it is saving to an external 1tb USB HDD. So not quite slow. And this is the same device it has been doing it to in both instances (on board ethernet and the adapter).
RPiB, RPi2B, RPi0, RPi3B, RPi3B+, RPi4B2Gb, RPi4B4Gb :D

User avatar
bensimmo
Posts: 4175
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Slow Download Speed using Gigabit Adapter

Mon Mar 20, 2017 8:43 am

25mbit abysmal :lol: , most of the UK would love even the slower speed you are actually getting.

User avatar
RaTTuS
Posts: 10459
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Slow Download Speed using Gigabit Adapter

Mon Mar 20, 2017 8:44 am

some torrent type programs may have issues because some temp files may end up on the sdcard - which may be not what your after, [some torrents may be opening too many connections and overwhelming the link on the RPi]
direct downloads should be fine [try wget if you can]
speedtest.cli may show bad results [because of reasons]
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
Randomp
Posts: 25
Joined: Wed Jun 26, 2013 8:05 pm

Re: Slow Download Speed using Gigabit Adapter

Mon Mar 20, 2017 8:51 am

RaTTuS wrote:some torrent type programs may have issues because some temp files may end up on the sdcard - which may be not what your after, [some torrents may be opening too many connections and overwhelming the link on the RPi]
direct downloads should be fine [try wget if you can]
speedtest.cli may show bad results [because of reasons]
This particular Pi is fully booting off of that HDD though, other than the FAT partition on the SD for initial boot, everything is on the HDD in EXT4. If this was an issue with any of that, it should technically happen with the on board ethernet seeing as that shares the same bus as the USB ports, right?
RPiB, RPi2B, RPi0, RPi3B, RPi3B+, RPi4B2Gb, RPi4B4Gb :D

User avatar
RaTTuS
Posts: 10459
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Slow Download Speed using Gigabit Adapter

Mon Mar 20, 2017 8:56 am

Randomp wrote:...technically happen with the on board ethernet seeing as that shares the same bus as the USB ports, right?
yes
without investigating more I cannot offer a solution - [really busy ATM so not sure how to advise]
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
Randomp
Posts: 25
Joined: Wed Jun 26, 2013 8:05 pm

Re: Slow Download Speed using Gigabit Adapter

Mon Mar 20, 2017 9:57 am

RaTTuS wrote:
Randomp wrote:...technically happen with the on board ethernet seeing as that shares the same bus as the USB ports, right?
yes
without investigating more I cannot offer a solution - [really busy ATM so not sure how to advise]
Upon further inspection, it seems it was all my fault. I set a maximum download speed limit for the device at some point so it would not interfere with my other network traffic and forgot to disable it. I guess this is one of the reasons I should not be doing troubleshooting in the middle of the night. :oops:

If anyone runs across this topic via a Google search, check the basic settings in the program you are having difficulties with first. ;) The problem might be in plain sight.

If anything is slower, I can't tell now since it is maxing out my WAN once again. Local transfers are also faster. It's not gigabit, but definitely worth the $9 USD spent on the adapter.
RPiB, RPi2B, RPi0, RPi3B, RPi3B+, RPi4B2Gb, RPi4B4Gb :D

esreborn
Posts: 1
Joined: Sun Aug 27, 2017 9:08 pm

Re: Slow Download Speed using Gigabit Adapter

Sun Aug 27, 2017 9:10 pm

I too am having the same issue, I get ~340 down but my Pi is reading about 60-70 down, even with a Gigabit adapter attached.

Are their default limits to down speeds on the Pi? If so, how do I remove them?

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Slow Download Speed using Gigabit Adapter

Mon Aug 28, 2017 11:51 am

esreborn wrote:
Sun Aug 27, 2017 9:10 pm
I too am having the same issue, I get ~340 down but my Pi is reading about 60-70 down, even with a Gigabit adapter attached.
How are you measuring that 60-70 speed?

Remember the USB bus is shared between all USB devices, so if that's the speed reported from some download program that's writing to a USB storage device then that will reduce the speed available to the network adaptor, you may also be limited by the write speed of the device being written to.

User avatar
DougieLawson
Posts: 36130
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Slow Download Speed using Gigabit Adapter

Mon Aug 28, 2017 1:07 pm

The RPi has a single 480Mbp/s USB 2.0 interface (that's ~57MB/s). That's being used for your USB HDD and your gigabit ethernet. So you'll never get faster than that. HDDs tend to be exceedingly slow in the grand scheme of things (although not as glacially slow as an SDcard). Channel busy, cache flush, rotational delay and RPS miss (record to be written not under the head) are the significant delays with spinning things. You eliminate most of those things with bigger cache and SSD drives.

If you were able to drive both the network and HDD at max speed then you'd get around 28MB/s (nothing else running, and no other USB devices and none of the performance bottlenecks).
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

FireFart
Posts: 4
Joined: Mon Jan 23, 2017 2:56 pm

Re: Slow Download Speed using Gigabit Adapter

Mon Aug 28, 2017 1:30 pm

DougieLawson wrote:
Mon Aug 28, 2017 1:07 pm
The RPi has a single 480Mbp/s USB 2.0 interface (that's ~57MB/s). That's being used for your USB HDD and your gigabit ethernet. So you'll never get faster than that. HDDs tend to be exceedingly slow in the grand scheme of things (although not as glacially slow as an SDcard). Channel busy, cache flush, rotational delay and RPS miss (record to be written not under the head) are the significant delays with spinning things. You eliminate most of those things with bigger cache and SSD drives.

If you were able to drive both the network and HDD at max speed then you'd get around 28MB/s (nothing else running, and no other USB devices and none of the performance bottlenecks).
That should be the case but in my setup mentioned above I'm stuck at around 50-70Mbps :/

Return to “Advanced users”