# Test your server's upload and download speed



## black (Sep 25, 2013)

wget dl.getipaddr.net/speedtest.sh 2>/dev/null -O- | bash 

or

curl -s dl.getipaddr.net/speedtest.sh -o- | bash

I decided to create a script that tests the server's download speed as well as upload. To me, this has been something that's long overdue and I'm surprised that no one has done it yet.

Unlike speedtestcli (the python script) which interfaces with speedtest.net, this one uses way less RAM.

There's a few options like force 100MB file size tests instead, instructions on how to do that can be found here.

Let me know if you guys have any issues. If it's security related, please send it to me via PM.


----------



## drmike (Sep 25, 2013)

Thanks! Interesting new script.

Folks will need to install bc and curl....     The script notes this at runtime  

So far, unimpressed with speeds I am seeing.  Unsure about to test other locations to see how the results compare.


----------



## NodeBytes (Sep 25, 2013)

Testing US locations

Speedtest from Houston, TX, USA on a shared 1 Gbps port

Download Speed: 4.66 MB/sec

Upload speed: 9.14 MB/sec

Speedtest from Los Angeles, CA, USA [ generously donated by http://maximumvps.net ] on a shared 1 Gbps port

Download Speed: 6.34 MB/sec

Upload speed: 5.67 MB/sec

Speedtest from Dallas, TX, USA on a shared 4x1 Gbps port

Download Speed: 5.77 MB/sec

Upload speed: 10.72 MB/sec

 

Testing EU locations

Speedtest from Tallinn, Estonia on a shared 1 Gbps port

Download Speed: 1.38 MB/sec

Upload speed: 3.29 MB/sec


----------



## black (Sep 25, 2013)

buffalooed said:


> Thanks! Interesting new script.
> 
> Folks will need to install bc and curl....     The script notes this at runtime
> 
> So far, unimpressed with speeds I am seeing.  Unsure about to test other locations to see how the results compare.


Correct. Bc was needed for accuracy to 2 decimal places; Bash's built in only has integer division. I only have 2 spare VPSes dedicated to this. If are people willing to donate a container, I'd be happy to add it to the list.


----------



## NodeBytes (Sep 25, 2013)

I'll donate one. PM Me.


----------



## KuJoe (Sep 25, 2013)

Typo in the script. 
 



> *curlis* not installed, install it to continue, typically you can install it by typing


Not a big deal but just an FYI for those OCD peoples out there.  :wacko:


----------



## KuJoe (Sep 25, 2013)

```
Forcing 100MB speed test
Testing US locations
Speedtest from Houston, TX, USA on a shared 1 Gbps port
        Download Speed: 17.27 MB/sec
        Upload speed: 28.48 MB/sec
Speedtest from Los Angeles, CA, USA [ generously donated by http://maximumvps.net ] on a shared 1 Gbps port
        Download Speed: 13.05 MB/sec
        Upload speed: 13.61 MB/sec
Speedtest from Dallas, TX, USA on a shared 4x1 Gbps port
        Download Speed: 20.78 MB/sec
        Upload speed: 41.04 MB/sec
 
Testing EU locations
Speedtest from Tallinn, Estonia on a shared 1 Gbps port
        Download Speed: 5.04 MB/sec
        Upload speed: 7.56 MB/sec
```


----------



## black (Sep 25, 2013)

KuJoe said:


> Typo in the script.
> 
> Not a big deal but just an FYI for those OCD peoples out there.  :wacko:


I happen to be one of those OCD people 



KuJoe said:


> Looks like you can force it to use a 100MB test file instead of a 10MB one, this should show more accurate speeds if you have a fast port speed.
> 
> 
> touch FORCE100MBFILESPEEDTEST


Correct. It's probably easier if someone does a local touch instead of me serving them a blank file. I'll update the options page to reflect that. Thanks!


----------



## blergh (Sep 25, 2013)

Interesting script indeed, good work!

Is this list of the providers used for the mirrors correct?

vmPort - Houston, TX

maximumvps - Los Angeles, CA

Incero - Dallas, TX

WaveCom - Tallin, EE


----------



## KuJoe (Sep 25, 2013)

The IPs are in the file if you want to do a whois on them.


----------



## Enterprisevpssolutions (Sep 25, 2013)

spun up a quick centos 6.4. Not bad you can also use the server-bear scripts for testing the whole vps system not just network speed. https://github.com/Crowd9/Benchmark


----------



## black (Sep 25, 2013)

Enterprisevpssolutions said:


> spun up a quick centos 6.4. Not bad you can also use the server-bear scripts for testing the whole vps system not just network speed. https://github.com/Crowd9/Benchmark


Correct. Serverbear incorporates various benchmark tools that are known and outputs it a user-friendly format. What I aimed to achieve with this script is to get a complete picture of the network utilization. I believe that VPS owners have a false sense of their network capabilities if they are only testing the download speed.

In the US on a residential plan for an ISP, the download speed far exceeds the upload speed. That's because the ISP expects an end user to be downloading content more often than uploading, which suggests that download speeds are more important. Conversely, shouldn't a server's upload speed be more important than the download one, or at least as equal as the download speed, since it's purpose is to serve content? Yet people still think "well, my wget to cachefly is good, my network speed must be good."


----------



## drmike (Sep 26, 2013)

Any reason why this script should perform poorly on say a Debian install inside OpenVZ?

Speeds I am getting from a number of providers under such environment are disturbingly slow.

In contrast, a dedicated server:

touch FORCE100MBFILESPEEDTEST && wget dl.getipaddr.net/speedtest.sh 2>/dev/null -O- | bash
Forcing 100MB speed test
Testing US locations
Speedtest from Houston, TX, USA on a shared 1 Gbps port
Download Speed: 29.35 MB/sec
Upload speed: 42.33 MB/sec
Speedtest from Los Angeles, CA, USA [ generously donated by http://maximumvps.net ] on a shared 1 Gbps port
Download Speed: 23.89 MB/sec
Upload speed: 28.86 MB/sec
Speedtest from South Bend, Indiana, USA [ generously donated by NodeBytes ] on a shared 100 Mbps port
Download Speed: 12.11 MB/sec
Upload speed: 19.78 MB/sec
Speedtest from Dallas, TX, USA on a shared 4x1 Gbps port
Download Speed: 31.93 MB/sec
Upload speed: 64.31 MB/sec

Testing EU locations
Speedtest from Tallinn, Estonia on a shared 1 Gbps port
Download Speed: 5.47 MB/sec
Upload speed: 8.14 MB/sec


----------



## black (Sep 26, 2013)

I looked into this.

From my tinyvz container


Forcing 100MB speed test
Testing US locations
Speedtest from Houston, TX, USA on a shared 1 Gbps port
Download Speed: 28.32 MB/sec
Upload speed: 22.35 MB/sec
Speedtest from Los Angeles, CA, USA [ generously donated by http://maximumvps.net ] on a shared 1 Gbps port
Download Speed: 28.77 MB/sec
Upload speed: 9.80 MB/sec
Speedtest from South Bend, Indiana, USA [ generously donated by NodeBytes ] on a shared 100 Mbps port
Download Speed: 12.10 MB/sec
Upload speed: 12.71 MB/sec
Speedtest from Dallas, TX, USA on a shared 4x1 Gbps port
Download Speed: 23.63 MB/sec
Upload speed: 36.06 MB/sec

Testing EU locations
Speedtest from Tallinn, Estonia on a shared 1 Gbps port
Download Speed: 5.83 MB/sec
Upload speed: 6.38 MB/sec

Results seem ok. Tinyvz doesn't use solusVM as their control panel and I remember solus having ways to throttle your connection so there might be something there? There might be some host OS tcp tuning?

My tinyvz container runs on debian 6 with kernel 2.6.27 #1 SMP Mon May 9 13:27:11 CEST 2011 i686 GNU/Linux.

Remember that this is all done via http, a higher layer on the OSI model so the speed test servers make no distinction between which visualization you use (simply because it doesn't know).

The problem would most likely reside in the ovz container or the host node of your ovz container. It's also a good bet that since the speedtest servers are giving you low results, your clients (the people you're serving on that particular openvz container) are getting those speeds as well.


----------



## bizzard (Sep 26, 2013)

This is what I get on my BlueVM VPS at located at CA, USA




> Testing US locations
> 
> Speedtest from Houston, TX, USA on a shared 1 Gbps port
> 
> ...


----------



## WSWD (Sep 26, 2013)

buffalooed said:


> Any reason why this script should perform poorly on say a Debian install inside OpenVZ?
> 
> Speeds I am getting from a number of providers under such environment are disturbingly slow.


Honestly, the servers being used as test servers don't appear to be the greatest, or are being overloaded with all of us testing.  Even my in-network speeds (Incero - Incero, Quadranet - Quadranet) aren't terribly great, and I know it's not my servers! 

Doesn't explain the Debian issue though...


----------



## black (Sep 26, 2013)

WSWD said:


> Honestly, the servers being used as test servers don't appear to be the greatest, or are being overloaded with all of us testing.  Even my in-network speeds (Incero - Incero, Quadranet - Quadranet) aren't terribly great, and I know it's not my servers!
> 
> Doesn't explain the Debian issue though...


I wish I had money for dedicated pipes


----------



## WSWD (Sep 26, 2013)

black said:


> I wish I had money for dedicated pipes


I hear ya!  My only point is that if people are actually using this script to troubleshoot their own servers or get much useful information, don't.  From my limited testing yesterday, the numbers are simply not realistic, I'm guessing due to the overload.  It's just not a realistic speed test.


----------



## IslandGalPal (Oct 5, 2013)

Hi there, I'm in Idaho, Speedtest Seattle. Sorry I'm new. Can't seem to attach a file -  anyway

my download was 46.53Mbps and upload was 2.37Mbps


----------



## black (Oct 5, 2013)

IslandGalPal said:


> Hi there, I'm in Idaho, Speedtest Seattle. Sorry I'm new. Can't seem to attach a file -  anyway
> 
> my download was 46.53Mbps and upload was 2.37Mbps


The speedtest VM container that was donated to me in Idaho said it was 100 Mbps connection so that's what I put in the script. Is that what you were referring to?


----------



## fahad (Oct 29, 2013)

Is this Supposed to be ???
 

*BLUEVM*,Buffalo,NY


Testing US locations
Speedtest from Los Angeles, CA, USA [ generously donated by http://maximumvps.ne                                                                                        t ] on a shared 1 Gbps port
        Download Speed: 4.94 MB/sec
        Upload speed: .72 MB/sec
Speedtest from Los Angeles, CA, USA [ generously donated by TeraFire, LLC ] on a                                                                                         shared 1 Gbps port
        Download Speed: 3.90 MB/sec
        Upload speed: .75 MB/sec
Speedtest from South Bend, Indiana, USA [ generously donated by NodeBytes ] on a                                                                                         shared 100 Mbps port
        Download Speed: 9.98 MB/sec
        Upload speed: 1.14 MB/sec
Speedtest from Houston, TX, USA on a shared 1 Gbps port
        Download Speed: .73 MB/sec
        Upload speed: .54 MB/sec
Speedtest from Chicago, IL, USA [ generously donated by http://vortexservers.com                                                                                         ] on a shared 1Gbps port
        Download Speed: 3.06 MB/sec
        Upload speed: .83 MB/sec
Speedtest from Buffalo, NY, USA on a shared 1 Gbps port
        Download Speed: 173.59 MB/sec
        Upload speed: 82.12 MB/sec
Speedtest from Atlanta, GA, USA [ generously donated by http://hostus.us ] on a                                                                                         shared 1Gbps port
        Download Speed: 16.85 MB/sec
        Upload speed: 1.79 MB/sec
Speedtest from Clifton, NJ, USA [ generously donated by http://dedicatedminds.co                                                                                        m ] on a shared 1Gbps port
        Download Speed: 21.53 MB/sec
        Upload speed: 5.20 MB/sec

Testing EU locations
Speedtest from Tallinn, Estonia on a shared 1 Gbps port
        Download Speed: 1.32 MB/sec
        Upload speed: .26 MB/sec
Speedtest from Amsterdam, Netherlands on a shared 1 Gbps port
        Download Speed: 2.16 MB/sec
        Upload speed: 1.43 MB/sec
*BLUEVM*,CHICAGO,IL


```
Testing US locations
Speedtest from Los Angeles, CA, USA [ generously donated by http://maximumvps.net ] on a shared 1 Gbps port
        Download Speed: 9.74 MB/sec
        Upload speed: .46 MB/sec
Speedtest from Los Angeles, CA, USA [ generously donated by TeraFire, LLC ] on a shared 1 Gbps port
        Download Speed: 2.90 MB/sec
        Upload speed: .42 MB/sec
Speedtest from South Bend, Indiana, USA [ generously donated by NodeBytes ] on a shared 100 Mbps port
        Download Speed: 14.83 MB/sec
        Upload speed: 3.85 MB/sec
Speedtest from Houston, TX, USA on a shared 1 Gbps port
        Download Speed: 1.36 MB/sec
        Upload speed: 1.51 MB/sec
Speedtest from Chicago, IL, USA [ generously donated by http://vortexservers.com ] on a shared 1Gbps port
        Download Speed: 99.10 MB/sec
        Upload speed: 37.22 MB/sec
Speedtest from Buffalo, NY, USA on a shared 1 Gbps port
        Download Speed: 2.59 MB/sec
        Upload speed: .56 MB/sec
Speedtest from Atlanta, GA, USA [ generously donated by http://hostus.us ] on a shared 1Gbps port
        Download Speed: 2.77 MB/sec
        Upload speed: 3.12 MB/sec
Speedtest from Clifton, NJ, USA [ generously donated by http://dedicatedminds.com ] on a shared 1Gbps port
        Download Speed: 12.43 MB/sec
        Upload speed: .55 MB/sec

Testing EU locations
Speedtest from Tallinn, Estonia on a shared 1 Gbps port
        Download Speed: 1.59 MB/sec
        Upload speed: .15 MB/sec
Speedtest from Amsterdam, Netherlands on a shared 1 Gbps port
        Download Speed: .68 MB/sec
        Upload speed: 12.70 MB/sec
```


----------



## peterw (Oct 29, 2013)

fahad said:


> Is this Supposed to be ???


The script does not show correct values. The test servers are overloaded.


----------



## black (Oct 29, 2013)

fahad said:


> Is this Supposed to be ???
> 
> *BLUEVM*,Buffalo,NY
> 
> ...


That's really weird because I don't recall having an Amsterdam, NL location.



peterw said:


> The script does not show correct values. The test servers are overloaded.


This isn't correct. Yes they're shared but if the majority of the nodes are reporting low upload speeds, then the odds of your server actually having slow upload speed is higher than all the test servers being "overloaded" at the same time, especially if you run the script more than once.


----------



## NodeBytes (Oct 29, 2013)

Strange, I know at least the server I'm operating isn't overloaded. It must be how the tests are handled.


----------



## WSWD (Oct 29, 2013)

peterw said:


> The script does not show correct values. The test servers are overloaded.


This!  As I mentioned on the previous page, there is something very wrong with the tests, either the script itself or the servers.  I'm guessing it's the servers, as it is pretty difficult to code a download/upload script improperly as far as the actual test itself is concerned.

I consistently get bad results in-network, i.e. Incero-to-Incero, Quadranet-to-Quadranet, etc.  Yet between my own servers in-network, I can max the ports out all day long.


----------



## NodeBytes (Oct 29, 2013)

WSWD said:


> This!  As I mentioned on the previous page, there is something very wrong with the tests, either the script itself or the servers.  I'm guessing it's the servers, as it is pretty difficult to code a download/upload script improperly as far as the actual test itself is concerned.
> 
> I consistently get bad results in-network, i.e. Incero-to-Incero, Quadranet-to-Quadranet, etc.  Yet between my own servers in-network, I can max the ports out all day long.


I get different results when using this test script. Other scripts don't have the same issues.


----------



## DomainBop (Oct 29, 2013)

test results with the script (tests were taken using a dedicated server in Milan with a 1Gbps connection)



> -------------Speed test--------------------
> Testing US locations
> Speedtest from Los Angeles, CA, USA [ generously donated by http://maximumvps.net ] on a shared 1 Gbps port
> Download Speed: 3.64 MB/sec
> ...



The 2.88MB/s-3.64MB/s download speed results from California (Los Angeles) with that script are less than 1/2 the download speed from California (San Jose) shown by the freevps.us script:



> wget freevps.us/downloads/bench.sh -O - -o /dev/null|bash
> CPU model :  Intel® Core i7-3770 CPU @ 3.40GHz
> Number of cores : 8
> CPU frequency :  1600.000 MHz
> ...



tl;dr the script's use of VPS's on shared ports as the download locations needs to be rethought for it to be useful


----------



## fahad (Oct 29, 2013)

black said:


> That's really weird because I don't recall having an Amsterdam, NL location.


....




Sorry Black , I just added one more location to test the script. Is that OK ?


And Thank You Very Much for this Amazing Script !!!!


----------



## black (Oct 29, 2013)

I'm not sure what could be wrong, as I'm using functions directly available from cURL. The code is really neat if you guys want to take a look at it.

From the curl man pages:

              speed_download The average download speed that curl measured for

                             the complete download. Bytes per second.

 

              speed_upload   The  average  upload speed that curl measured for

                             the complete upload. Bytes per second.

 

Are you experiencing inaccuracy in both download and upload or just download/upload?


----------



## fahad (Oct 29, 2013)

black said:


> I'm not sure what could be wrong, as I'm using functions directly available from cURL. The code is really neat if you guys want to take a look at it.
> 
> From the curl man pages:
> 
> ...



Accuracy is 100% , Problem is with the selected servers which are shared and can not give you the exact up/down speed. You can get a idea of true up/down speed from the results by running two three times and compare.


And i think you have done a great thing.


----------



## WSWD (Oct 30, 2013)

I don't think it's the script either.  There isn't a whole lot you can do wrong with the script.


----------



## HostUS-Alexander (Dec 17, 2013)

Nice!


----------



## Riccardo_G (Jan 9, 2014)

hello to all friends

sorry for my absence

I tidied up the office

Happy New Year to all

try this script

and do you know


----------



## black (Jan 9, 2014)

Riccardo_G said:


> hello to all friends
> 
> sorry for my absence
> 
> ...


?


----------



## Eased (Jan 10, 2014)

black said:


> ?


I apologize for that, he somehow escaped from his shackles in the basement. 

Bad Riccardo, bad!


----------



## tragic (Jan 10, 2014)

Eased said:


> I apologize for that, he somehow escaped from his shackles in the basement.
> 
> Bad Riccardo, bad!


Or tied up in his office?


----------



## Riccardo_G (Jan 10, 2014)

sorry for my bad english

I'm Italian

I'm Sicilian 

I studied French at school

I meant to say

I try this script

and I write my humble opinion


----------



## black (Jan 11, 2014)

Riccardo_G said:


> sorry for my bad english
> 
> I'm Italian
> 
> ...


So it's good right? Hopefully you're not having any issues.


----------



## maounique (Jan 11, 2014)

2014-01-12 03:44:49 ERROR 522: Origin Connection Time-out.

Trying from DO Amsterdam.


----------



## black (Jan 12, 2014)

Mao_Member_no_signature said:


> 2014-01-12 03:44:49 ERROR 522: Origin Connection Time-out.
> 
> Trying from DO Amsterdam.


Sorry, the server running the site went down. I'm adding monitoring now and it should be available.


----------



## maounique (Jan 12, 2014)

[email protected]:~# wget dl.getipaddr.net/speedtest.sh 2>/dev/null -O- | bash
-------------Speed test--------------------
Testing North America locations
Speedtest from Los Angeles, CA, USA [ generously donated by http://maximumvps.net ] on a shared 1 Gbps port
        Download Speed: 3.44 MB/sec
        Upload speed: 1.28 MB/sec
Speedtest from Los Angeles, CA, USA [ generously donated by TeraFire, LLC ] on a shared 1 Gbps port
        Download Speed: 3.59 MB/sec
        Upload speed: 7.43 MB/sec
Speedtest from Phoenix, AZ, USA [ generously donated by http://hostnun.net/ ] on a shared 1 Gbps port
        Download Speed: 3.18 MB/sec
        Upload speed: 6.32 MB/sec
Speedtest from Dallas, TX, USA on a shared 1 Gbps port
        Download Speed: 3.65 MB/sec
        Upload speed: .13 MB/sec
Speedtest from Chicago, IL, USA [ generously donated by http://vortexservers.com ] on a shared 1 Gbps port
        Download Speed: 3.65 MB/sec
        Upload speed: .83 MB/sec
Speedtest from Buffalo, NY, USA on a shared 1 Gbps port
        Download Speed: 4.59 MB/sec
        Upload speed: 3.03 MB/sec
Speedtest from Beauharnois, Quebec, Canada [ generously donated by http://mycustomhosting.net ] on a shared 1000 Mbps port in / 500 Mbps port out
        Download Speed: 3.60 MB/sec
        Upload speed: 11.90 MB/sec
Speedtest from Atlanta, GA, USA [ generously donated by http://hostus.us ] on a shared 1 Gbps port
        Download Speed: 4.71 MB/sec
        Upload speed: 8.38 MB/sec
Speedtest from Clifton, NJ, USA [ generously donated by http://dedicatedminds.com ] on a shared 1 Gbps port
        Download Speed: 6.21 MB/sec
        Upload speed: 8.16 MB/sec

Testing EU locations
Speedtest from Tallinn, Estonia on a shared 1 Gbps port
        Download Speed: 18.39 MB/sec
        Upload speed: 30.82 MB/sec
Speedtest from Milan, Italy [ generously donated by http://www.prometeus.net ] on a shared 1 Gbps port
        Download Speed: 20.61 MB/sec
        Upload speed: 11.84 MB/sec
Speedtest from Frankfurt am Main, Germany [ generously donated by http://www.prometeus.net ] on a shared 1 Gbps port
        Download Speed: 52.12 MB/sec
        Upload speed: 73.47 MB/sec
Speedtest from Bucharest, Romania [ generously donated by http://www.prometeus.net ] on a semi-dedicated 1 Gbps port
        Download Speed: 11.24 MB/sec
        Upload speed: 2.21 MB/sec
---------------CPU test--------------------
CPU: 1 x QEMU Virtual CPU version 1.0
Time taken to generate PI to 5000 decimal places with a single thread: 0m40.377s
----------------IO test-------------------
Writing 1000MB file to disk
(1.1 GB) copied, 7.04236 s, 152 MB/s
 

Seems about right, some results are surprising especially the dallas upload, but that was so eversince i tried it first time, I suspect it is the location.


----------



## black (Jan 12, 2014)

Mao_Member_no_signature said:


> Seems about right, some results are surprising especially the dallas upload, but that was so eversince i tried it first time, I suspect it is the location.
> 
> Proud rMember
> 
> ...


Yeah, since these servers are running on a shared port, take the results with a grain of salt. However, if all of them or most of them say your upload speed is slow, then it probably is.


----------



## maounique (Jan 12, 2014)

If you consistently get similar results from various providers, drop me a line so maybe I can arrange something for Dallas.


----------



## fahad (Jan 12, 2014)

Script is improved ...


----------



## black (Feb 8, 2014)

Mao_Member_no_signature said:


> If you consistently get similar results from various providers, drop me a line so maybe I can arrange something for Dallas.


Since these are mostly VPSes, they're on a shared port so the speed is not consistent, per-se. If you have a VPS to donate, please PM me.



fahad said:


> Script is improved ...


Yes it has  More locations, runs a benchmark on the CPU by calculating PI (with no additional dependencies), and dd to test I/O (because everyone loves that for some reason).


----------

