What are the techniques to test the connection speed of a server (in my case, virtual Ubuntu server @ Slicehost)? Bonus points for one liner bash command.
What are the techniques to test the connection speed of a server (in my case, virtual Ubuntu server @ Slicehost)? Bonus points for one liner bash command.
One of the better command line tools for checking bandwidth available is iperf. However you need another box on an known fast connection to run the test against. I'm not aware of any public iperf servers.
Run
netserver
on one computer andnetperf -h other.server.com -l 30
on another; see the official Netperf site for more details, source, and a Windows binary (most *nix port/package systems have netperf in them). Note: the results will be limited by the slowest connection between the two and port 12865 must be open on the server side.Take a look at this question for a technique to use
dd
overnetcat
and make note of the discovery that disk I/O was the limiting factor over a local network with the particular hardware involved. Over the internet and with faster hardware, your mileage may vary. By using/dev/zero
as the source and/dev/null
as the destination, the disk I/O factor will be eliminated as noted in the comments.This is my own one-linner to get the time of th emost basic HTTP 1/1 request on my servers. Change www.foo.com by the ServerName and 192.168.1.15by the HTTP server IP (use the IP, as with the real name you would have the DNS search time added).
I usually do it on a very simple default Virtualhost with a static HTML page, to get the base response time (no cgi or php things, not even session, mod_rewrite or auth managment.
For the real time tracking I use Nagios plugins, apache status results (very usefull on bash one linners as well wityh q=auto), and sometime autobench (based on httperf).
I think the simplest is to use iftop.
On the server @ slicehost run
Then start downloading a large file with wget in another SSH window.
From the iftop man page:
etc...