How to diagnose slow upload speeds on Ubuntu Server 18.04

5,803

On Ubuntu 18.04

speedtest-cli as installed by apt:

$ speedtest-cli --server 2173

Retrieving speedtest.net configuration...
Testing from TPG Internet (<my IP>)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by Internode (Sydney) [1.01 km]: 15.25 ms
Download: 84.62 Mbit/s
Upload: 3.82 Mbit/s

the python (linked above) from speedtest-cli master:

$ ./speedtest.py --server 2173

Retrieving speedtest.net configuration...
Testing from TPG Internet (<my IP>)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by Internode (Sydney) [1.01 km]: 14.583 ms
Download: 84.64 Mbit/s
Upload: 38.26 Mbit/s

The second matches a web page result from same machine.

Incidentally, brew installing speedtest-cli on my macbook, on the same network produces the same (faster) result as the second (as does a browser on the macbook). Clearly, the apt installed speedtest-cli has an issue since direct python on the same machine does not.

Share:
5,803

Related videos on Youtube

OstrichGlue
Author by

OstrichGlue

Updated on September 18, 2022

Comments

  • OstrichGlue
    OstrichGlue almost 2 years

    I'm currently running Ubuntu Server 18.04 on a home server build to act as a Plex server, among other things. I have it connected via ethernet (with a 5-port switch between it and the router), and get download speeds consistently in the 750-900 MBit/s range when running speedtest-cli, which is expected. However, the upload speed has never gone above 5 MBit/s, despite every other machine in the house getting speeds around 300-400 or more when performing speedtests.

    How can I diagnose what might be causing these slow upload speeds? I'm unsure what might be causing the issue if other devices are having no trouble on the same network, including another computer that is connected to the same 5-port switch. I tried basic things like resetting the router and swapping cables and ports on the switch but that did not change anything.

    Edit: It's possible this might be an issue with speedtest-cli. I've found two separate issues on the github discussing slow upload speed results, and also seen other comments regarding a similar discrepancy between DL and UL speeds using the tool.

    Thread 1

    Thread 2

    I'll try to use an alternative method to test and see what the result is.

    Second Edit: I just confirmed that speedtest-cli is indeed broken for upload speeds. I found this article that point to a different script for testing speeds, and was able to get results consistent with my network speeds.

    • Jeff Schaller
      Jeff Schaller about 5 years
      While your question is on-topic here at U&L, if you think your problem is Ubuntu-specific, we have a sister site Ask Ubuntu full of Ubuntu experts. You could delete & re-ask your question there, or flag your post for moderator attention requesting a migration there.
    • OstrichGlue
      OstrichGlue almost 5 years
      @gogoud Thanks, got pretty lucky to be in an area with fiber at a reasonable price
    • TheKarateKid
      TheKarateKid over 4 years
      That page uses the same speedtest-cli script as the one in the Ubuntu repo. Perhaps it's a newer different version since you're downloading the source directly, but don't be fooled thinking it's a different test.