Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Benchmarking 10G Networking With Iperf

Today I wanted to test that my 10 Gigabit SFP+ connection was capable of hitting 10 Gigabit even though my NAS's spinning drives can't write at the 1192.09 MiB/s that this would require. If you have a few SSDs in RAID 0, or a Samsung 960 evo you could easily achieve this speed.

Initially I tried a bunch of scenarios, ending with running 4 parallel rcp commands to /dev/null, but I could only achieve just over 4 gigabits per second with my CPU being the bottleneck (a dual core hyper-threaded Pentium G4560t).

This is when I asked for help and was told about iperf which allowed me to test my network without having to set up NFS, samba, or FTP in order to try and reduce the CPU usage of my data transfers.

Steps

Install iperf on the server and the client.

sudo apt-get install iperf

Have iperf listen for connections on the receiver/server:

iperf -s

Then on the sender/client, run this command (filling in your own server's IP or hostname):

sudo iperf -c my.server.or.ip.org -i1 -t 10 -m

Iperf will then output your transfer speeds, but you can also use nload.

As you can see, my 10 gigabit link is working fine. I will just need to put in a more powerful CPU and faster drives if I actually want to make use of the full 10g in real-world scenarios.

References

Last updated: 1st June 2024
First published: 16th August 2018