Server upload bandwidth testing

www.speedtest.net from the server itself. It can check the bandwidth to multiple locations.


Could you maybe use `fetch' or wget to grab a large tarball from a mirror site that's hosted in Europe? No need for installation of additional tools, can be done from the CLI and should provide stats for you too


speedtest-cli

Project on Github. Command line interface for testing internet bandwidth using speedtest.net

Here is a sample output


Speedtest.net CLI interface is easiest way.

sudo apt-get install pip
sudo pip install --upgrade
sudo pip install speedtest-cli

speedtest --list | ack -i 'san jose, ca'
9383) Sneaker Server (San Jose, CA, United States) [4066.05 km]
5479) Sonic.net, Inc (San Jose, CA, United States) [4066.62 km]
9540) DNASOLES (San Jose, CA, United States) [4066.62 km]

speedtest --server 5479

I also can test upload by serving a 1GB.bin file and downloading it from another server that claims 10Gbps or whatever speed you have.

You can create a 1GB file by doing the following (linux):

dd if=/dev/zero of=1GB.bin bs=1 count=0 seek=1G

Or you can use this handy alias I made:

# add to ~/.bash_aliases
mkfile_gple() {
  size=$1
  file=$2
  dd if=/dev/zero of=$file bs=1 count=0 seek=$size
}

$ mkfile_gple 1G 1GB.bin

On a mac, you can simply type: mkfile 1g 1GB.bin

Then you can download from another server (to test your target servers upload speed) with curl <ip-of-server>/1GB.bin -o /tmp/1GB.bin -- you should see the speed used in the transfer. You can also use wget <ip-of-server>/1GB.bin -O /tmp/1GB.bin

To install nginx do sudo apt-get install nginx and place your 1GB.bin file in /var/www/html. Now just download that 1GB.bin file to test its upload speed (a server is uploading when it serves web traffic). Be sure the line you are downloading from has sufficient bandwith (ie: another 1Gbps server).

I've found that I usually get about 10-20% of advertised speeds due to network conditions. ie: a 250Mbps line usually will give me 10-12Mbps consistently.