Run Basic Network Speed Bandwidth Throughput Test Between ESXi Hosts
Running tests before putting ESXi hosts into production is a very good idea as you can often flush out problems before hosts go into production which is much easier to remediate than after they are placed into production and you potentially have multiple hosts in a cluster that have issues and are running production workloads. One of the key areas that you want to give consideration to before placing a host into production is the network. This can flush out improperly configured VLANs, network cards, switch ports, etc. One of the things that is a great area to check before placing a host into production or in troubleshooting ESXi host performance is running tests on network speeds. This helps to determine if there is an issue with poor performance related to a network misconfiguration or some other issue. One of the primary tools that is used across the landscape today in determining network bandwidth and running throughput/speed tests is iPerf. Let’s take a look at how to Run Basic Network Speed Bandwidth Throughput Test Between ESXi Hosts using iPerf to determine/validate speed, bandwidth, etc.
VMware ESXi Includes iPerf Tool
As is covered here by William Lam, the iPerf and specifically the iPerf3 utility has been included natively into ESXi as of ESXi 6.5 Update 2. It is also the tool that is natively used by the new proactive VMware vSAN network tests which helps to instill confidence in the results of the test in terms of reliability and accuracy. If VMware trusts it to base the proactive network testing on, it should be a good tool to use in terms of general network testing.
The great thing about knowing about the iPerf tool being included natively in ESXi is that it can be used for non-vSAN environments for testing. Obviously not everyone may be running vSAN in their environment. Additionally, what if testing needs to be done between hosts that are not in the same vSAN cluster, not stretched, etc? Then iPerf makes perfect sense to be able to use for those use cases.
Where is it found? As William detailed in his article, it is found in the /user/lib/vmware/vsan/bin directory. The binaries we are interested in are the following:
- iperf3
- iperf3.copy
What is the point of having both files? You will receive an error that happens on the server side when using the regular iperf3 file, so the iperf3.copy is the file you want to use on the server side and the client ESXi server can use the regular iPerf3 file. The error seen is the following:
- iperf3: error – unable to start listener for connections: Operation not permitted
Run Basic Network Speed Bandwidth Throughput Test Between ESXi Hosts
Now, let’s look at actually running the bandwidth tests between two VMware ESXi hosts to determine network speed, bandwidth, throughput, etc. This involves three steps (optionally).
- Determine the IP address (network card) you want to run the tests between. You can specify this on the server side
- Disable the ESXi firewall on both hosts
- Run the iPerf3 and iPerf3.copy (server) utilities
Below on one of the ESXi hosts, I have navigated to the directory using the SSH command line. As you can see, both the iperf3 and iperf3.copy files exist in the directory.
Using the following command, we can easily get the IP Addresses that are bound to the various VMkernel adapters. This is helpful to know which IP Address to bind to the iperf3.copy listener when running the iperf utility server side.
- esxcli network ip interface ipv4 get
Here, I am using the IP address that is bound to my vMotion network for testing network speed, throughput, bandwidth, etc. As you can see in the following screen clip the -B switch allows you to pass in the IP Address you want to use on the server side.s
The next thing you can see in the following screen clip is that I have disabled the ESXi firewall, as by default this will stop the iPerf testing.
- esxcli network firewall set –enabled false
On the client side, I have disabled the ESXi firewall as well and have kicked off the client side iperf test using the -t (determines the number of tests) and the -V which determines verbose output.
On the server side, you see the results of the testing. This is a 10 gig network and indeed, we have gotten very close to the expected throughput speed.
On the client side, we see very similar results matching up to what the ESXi iperf3 server is displaying.
iPerf3 Documentation
A great resource to get started with understanding the various functionality and capabilities of iPerf for the various switch options is the official documentation page. This can be found here:
Wrapping Up
The ability to Run Basic Network Speed Bandwidth Throughput Test Between ESXi Hosts using the iPerf3 utility is a great way to eliminate the network when trying to pinpoint various issues. Since the utility is now included with ESXi, it provides a great, easy, quick way to see network performance between hosts, or another iPerf client/server endpoint. Even though VMware has included this utility mainly for use with the built-in network performance testing included with vSAN, as shown, the natively included utility can be used as a standalone means of network speed, bandwidth, throughput testing. This is definitely a handy tool to include in bag of troubleshooting tricks to ensure performance at the network layer is what it should be. The great thing with iPerf is that it allows either confirming or disproving the network as the culprit, as it is often blamed for every problem, true or not.