I have a gigabit network set up in my house and a few Ubuntu based boxes. Out of complete curiosity I would like to check the speed between the two boxes. I am not having any problems with speed or anything, it really is just the geek in me that is curious. Plus maybe the results will let me know if there is room for improvement, or that I have something configured wrongly.
So how do you properly test the network speed between Ubuntu boxes?
Best Answer
I use
iperf
. It's a client server arrangement in that you run it in server mode at one end and connect to its from another computer on the other side of the network.One both machines run:
We'll start an
iperf
server on one of the machines:And then on the other computer, tell
iperf
to connect as a client:On the client machine, you'll see something like this:
Of course, if you're running a firewall on the server machine, you'll need to allow connections on port 5001 or change the port with the
-p
flag.You can do pretty much the same thing with plain old
nc
(netcat) if you're that way inclined. On the server machine:And the client can pipe a gigabyte of zeros through
dd
over thenc
tunnel.As demod:
The timing there is given by
dd
but it should be accurate enough as it can only output as fast the pipe will take it. If you're unhappy with that you could wrap the whole thing up in atime
call.Remember that the result is in megabytes so multiply it by 8 to get a megabits-per-second speed. The demo above is running at 944mbps.