How to Test Internet Speed of Your VPS
|Several important factors to consider before buying a VPS are uptime, Internet connection speed, I/O speed, and CPU performance. Of course you can simply find some result of available benchmark tests submitted by users around the world at ServerBear.
But when you purchased the VPS and want to know its performance, then you can simply perform the benchmark test yourself, again, ServerBear will come in handy. But if you want second opinion regarding how fast is connection speed of your VPS, you can perform simple command line Speedtest.net test.
How to test Internet speed in command line
Most Linux-based Virtual Private Servers (vps) does not support GUI (graphical-based interface) so you have to manage everything from command line within your Terminal window or Putty.
SpeedTest.net is a well known Internet speed test available by simply accessing their site on any web browser that supports Flash. But they do also provide another way to conduct the test, via command line. So here it is the tutorial is all about.
How to Install SpeedTest CLI
Step 1 – Login to your VPS as root or any user with superuser privilege (so you can use sudo). Windows users can make use of Putty while Linux and Mac can use Terminal.
Step 2 – Download the SpeedTest Python-based script using wget command:
wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
Step 3 – Now do some chmod little trick:
chmod a+rx speedtest_cli.py
Step 4 – Move the file to appropriate location:
mv speedtest_cli.py /usr/local/bin/speedtest-cli
Step 5 – Now chown the script to user and group root:
chown root:root /usr/local/bin/speedtest-cli
That’s it.
Performing Speed Test
Use this basic magic command to conduct the test:
speedtest-cli
Here it is the screenshot pic of all the command syntax above:
But you can also generate a cool SpeedTest.net’s badge using this command:
speedtest-cli --share
The test will be performed with an output image of your speed test result so you can share it with others:
Simply open the Share results url on your browser.
So, how’s my result above? Is it speedy enough? 🙂
Anyway, normally SpeedTest will search for closest server in terms of geographic distance to conduct both download and upload test. That’s why the result is so high.
However, it has a cool feature allowing you to select to which SpeedTest.net’s server the test will be performed. Simply issue this command to see all available test locations:
speedtest-cli --list
It will then retrieve available test locations displayed in order based on closest servers first.
or add | more in the end of that syntax to display partially so you can scroll it down page by page:
speedtest-cli --list | more
For example, I want to know how fast is the connection speed from my VPS (in Netherland, Europe) to my other VPS (in New York, USA). So I simply choose any SpeedTest.net’s server located within New York. In my example I will pick the one from Rackwire.com at Rochester, New York (Distance: 5951.88 km from my current NL VPS). The location has ID #1239.
So I simply issue this command:
speedtest-cli --server #number
in my case is:
speedtest-cli --server 1239
and here’s the result:
Not bad isn’t it? The second test with –share parameter:
So what’s yours? Do not hesitate to share it with us (me and other readers) via command section below. Also mention in which provider you purchased the vps from.
I’m presssed by my vps.
http://www.iniz.com/
yes iniz is also one of my favorite providers. 🙂
Yeah but they dont beat ServerLoft 😀
http://www.webhostingstuff.com/uptime/serverloft.html
Thank you Sawiyati for this. It helped me figure out how is my speed from different locations.
It is also great to see you going for your dreams.
Keep it on.
An even simpler way to do this is to use wget and download a test file from the CacheFly CDN.
wget -O /dev/null http://cachefly.cachefly.net/100mb.test
It uses CDN tohelp cut down on skewing the results from latency due to geographic proximity and saves to /dev/null to avoid any bottleneck introduced by writing to disk.
http://www.speedtest.net/result/3683779435.png
VPS SSD From Wiredtree.
thanks 🙂 now test me server
KnownHost VPS-2:
http://www.speedtest.net/result/3705391719.png
My VPS: http://www.speedtest.net/result/3725157043.png
helo, how to uninstall it?
//www.speedtest.net/result/3843647817.png
With such monstorous server list you might want to use grep to filter the result like
speedtest-cli –list | grep ‘New York’
Is there a script for running this test every hour, and save the results in a file? This way you can see a connection performance graph over a period of time!
It was hard to find an another server that was fast enough… But here is the result: http://www.speedtest.net/result/4021939064.png
What if I want my result in MBps instead of Mbps. Can I do that. If yes, then how? Please reply. Great post I must admit.
You can also try http://dl.getipaddr.net
They use curl (which is a well known command line utility) to run a speed test.
In short
wget https://raw.github.com/blackdotsh/curl-speedtest/master/speedtest.sh && chmod u+x speedtest.sh && bash speedtest.sh
Just check your internet speed with great site … any kind of MB’s
Digital ocean vps AMS1 https://www.speedtest.net/result/4618060493.png not bad at all.
Cool!
Was looking for a tool like this, thanks for the share! 🙂
My servers. DigitalOcean(NL) and Linode (UK)
http://www.speedtest.net/result/4750071989.png
http://www.speedtest.net/result/4750078495.png
Paris France
http://www.speedtest.net/result/4828776072.png
https://www.speedtest.net/result/4836569562.png digitalocean AMS2
Interserver connection: http://www.interserver.net/
http://www.speedtest.net/result/4903676411.png
interserver offer 1 gigabit network but the results are others…
Scaleway http://www.speedtest.net/result/5268993707.png VC1
here is my liquid web vps spped: Download: 846mb/s Upload: 399mb/s
http://www.speedtest.net/result/5273540049.png
wget -O /dev/null http://cachefly.cachefly.net/100mb.test
Thanks, I just installed the test utilities for my vps at http://www.webmasteroffers.com, here is the result http://www.speedtest.net/result/5447802534.png
Angani.co Nairobi
http://www.speedtest.net/result/5650580598.png