vSAN strongly depends on the performance of the underlying network for the resulting performance of vSAN storage.
For troubleshooting purposes it may be necessary to validate the bandwidth available for use on the vSAN network. ESXi supports the use of the iperf utility for this testing, as explained below.
cd /usr/lib/vmware/vsan/bin
Looking in this folder, you may see multiple copies of the iperf application. It may be named iperf3 or iperf, depending on the version. Versions of ESXi prior to 7.0u3 prevented running this command directly and it was necessary to make a copy of the iperf program by running the following command: cp /usr/lib/vmware/vsan/bin/iperf3 /usr/lib/vmware/vsan/bin/iperf.copy2
On ESXi 8.0 and above, it is not necessary to make a copy of the program using the command above. You may see the error shown below, and the earlier method of creating an iperf3.copy and using execInstalledOnly might not work.
/usr/lib/vmware/vsan/bin/iperf3 -siperf3: error - unable to start listener for connections: Operation not permitted
To make it work we will have to disable the security policy which handles app execution called "appDom". This setting can be checked as follows:
localcli system secpolicy domain list | grep appDomappDom enforcing
Change the enforcement level for the Domain "appDom" from "enforcing" to "disabled":
localcli system secpolicy domain set -n appDom -l disabled
esxcli network firewall set --enabled false[root@Example_Server1:/usr/lib/vmware/vsan/bin] ./iperf3 -s -B 192.168.0.1 -p 5201 -i 1
------------------------------------------------------------
Server listening on TCP port 5201
Binding to local address 192.168.0.1
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.0.1 port 5201 connected with 192.168.0.2 port 65535
[ ID] Interval Transfer Bandwidth
[ 4] 0.0- 1.0 sec 866 MBytes 7.27 Gbits/sec
[ 4] 1.0- 2.0 sec 937 MBytes 7.86 Gbits/sec
[ 4] 2.0- 3.0 sec 921 MBytes 7.72 Gbits/sec
...
[root@Example_Server2:/usr/lib/vmware/vsan/bin] ./iperf3 -c 192.168.0.1
------------------------------------------------------------
Client connecting to 192.168.0.1, TCP port 5201
TCP window size: 0.03 MByte (default)
------------------------------------------------------------
[ 5] local 192.168.0.2 port 65535 connected with 192.168.0.1 port 5201
[ ID] Interval Transfer Bandwidth
[ 5] 0.0-10.0 sec 950 MBytes 1.1 Gbits/sec
...
esxcli network firewall set --enabled trueesxcli system secpolicy domain set -n appDom -l enforcing
Refer to the article vSAN Networking – Network Oversubscription for a detailed discussion on the relationship between network capacity and vSAN.