Test VM Network Throughput by Using NTTTCP - Microsoft Learn
Test VM Network Throughput by Using NTTTCP - Microsoft Learn
NTTTCP
Article • 02/12/2024
U Caution
This article references CentOS, a Linux distribution that is nearing End Of Life (EOL)
status. Please consider your use and planning accordingly.
This article describes how to use the free NTTTCP tool from Microsoft to test network
bandwidth and throughput performance on Azure Windows or Linux virtual machines
(VMs). A tool like NTTTCP targets the network for testing and minimizes the use of other
resources that could affect performance.
Prerequisites
An Azure account with an active subscription. Create an account for free .
Two Windows or Linux virtual machines in Azure. Create a Windows VM or create a
Linux VM.
To test throughput, you need two VMs of the same size to function as sender and
receiver. The two VMs should be in the same proximity placement group or
availability set, so you can use their internal IP addresses and exclude load
balancers from the test.
Note the number of VM cores and the receiver VM IP address to use in the
commands. Both the sender and receiver commands use the receiver's IP address.
7 Note
Testing by using a virtual IP (VIP) is possible, but is beyond the scope of this article.
ノ Expand table
Setting Value
Number of VM cores 2
Windows
2. Open the Windows command line and navigate to the folder where you
downloaded ntttcp.exe.
3. On the receiver VM, create a Windows Firewall allow rule to allow the NTTTCP
traffic to arrive. It's easier to allow nttcp.exe by name than to allow specific
inbound TCP ports. Run the following command, replacing c:\tools with your
download path for ntttcp.exe if different.
Receiver VM
ntttcp -r -m [<number of VM cores> x 2],*,<receiver IP address> -t 10 -P 1
ntttcp -r -m 4,*,10.0.0.5 -t 10 -P 1
Sender VM
ntttcp -s -m 4,*,10.0.0.5 -t 10 -P 1
7 Note
Tip
When you run the test for the first time to verify setup, use a short test
duration to get quick feedback. Once you verify the tool is working, extend
the test duration to 300 seconds for the most accurate results.
1. On the receiver VM, run the following command, replacing the <number of VM
cores> , and <receiver IP address> placeholders with your own values.
When the test is complete, the output should be similar as the following example:
Output
Windows
To test with the Windows VM as the receiver, run the following command:
To test with the Windows VM as the sender, run the following command:
Next steps
Optimize network throughput for Azure virtual machines.