Skip to content

Commit 226819a

Browse files
committed
edits
1 parent 38108ec commit 226819a

File tree

2 files changed

+81
-84
lines changed

2 files changed

+81
-84
lines changed

articles/virtual-network/virtual-network-bandwidth-testing.md

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Test Azure VM network throughput by using NTTTCP
2+
title: Test VM network throughput by using NTTTCP
33
description: Use the NTTTCP tool to test network bandwidth and throughput performance for Windows and Linux VMs on a virtual network.
44
services: virtual-network
55
author: asudbring
@@ -10,71 +10,67 @@ ms.date: 03/23/2023
1010
ms.author: allensu
1111
---
1212

13-
# Test network bandwidth or throughput with NTTTCP
13+
# Test VM network throughput by using NTTTCP
1414

15-
This article describes how to use the free NTTTCP tool from Microsoft to test network throughput performance on Azure Windows or Linux virtual machines (VMs). To test network throughput and bandwidth, it's best to use a tool like NTTTCP that targets the network for testing and minimizes the use of other resources that could affect performance.
15+
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.
1616

1717
## Prerequisites
1818

19-
To test throughput, you need two VMs of the same size to function as *sender* and *receiver*. The two VMs should be in either the same [proximity placement proup](/azure/virtual-machines/co-location) or the same [availability set](/azure/virtual-machines/availability-set-overview), so you can use their internal IP addresses and exclude load balancers from the test.
19+
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](/azure/virtual-machines/co-location) or [availability set](/azure/virtual-machines/availability-set-overview), so you can use their internal IP addresses and exclude load balancers from the test.
2020

21-
Note the number of VM cores and the VM IP addresses to use in the following procedures. Both the sender and receiver commands use the receiver's IP address.
21+
Note the number of cores and the IP addresses for the VMs to use in the following procedures. Both the sender and receiver commands use the receiver's IP address.
2222

2323
>[!NOTE]
2424
>Testing by using a virtual IP (VIP) is possible, but is beyond the scope of this article.
2525
26-
## Test throughput for Windows or Linux VMs
26+
## Test throughput between Windows VMs or Linux VMs
2727

28-
You can test throughput on Windows or Linux machines.
29-
30-
Run the NTTTCP test for 300 seconds, or five minutes, on both the sender and receiver VMs. The sender and receiver must specify the same test duration for the `-t` parameter. Test duration defaults to 60 seconds if no time parameter is specified.
28+
You can test throughput from Windows VMs by using [NTTTCP](https://github.com/microsoft/ntttcp) or from Linux VMs by using [NTTTCP-for-Linux](https://github.com/Microsoft/ntttcp-for-linux).
3129

3230
# [Windows](#tab/windows)
3331

3432
### Set up NTTTPS and test configuration
3533

3634
1. On both the sender and receiver VMs, [download the latest version of NTTTCP](https://github.com/microsoft/ntttcp/releases/latest) into a separate folder like *c:\\tools*.
3735

38-
1. On the receiver VM, create a Windows Defender 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. In the following command, replace the `<path>` placeholder with the path you downloaded *ntttcp.exe* to, such as *c:\\tools\\*.
36+
1. On the receiver VM, create a Windows Defender 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 the path you downloaded *ntttcp.exe* to if different.
3937

4038
```cmd
41-
netsh advfirewall firewall add rule program=<path>ntttcp.exe name="ntttcp" protocol=any dir=in action=allow enable=yes profile=ANY
39+
netsh advfirewall firewall add rule program=c:\tools\ntttcp.exe name="ntttcp" protocol=any dir=in action=allow enable=yes profile=ANY
4240
```
4341

44-
For example, if you copied *ntttcp.exe* to *c:\\tools*, run the following command: 
45-
46-
`netsh advfirewall firewall add rule program=c:\tools\ntttcp.exe name="ntttcp" protocol=any dir=in action=allow enable=yes profile=ANY`
47-
4842
1. To confirm your configuration, test a single Transfer Control Protocol (TCP) stream for 10 seconds by running the following commands:
4943

5044
- On the receiver VM, run `ntttcp -r -t 10 -P 1`.
5145
- On the sender VM, run `ntttcp -s<receiver IP address> -t 10 -n 1 -P 1`.
5246

53-
>[!TIP]
54-
>When you run the test for the first time to verify setup, you use a short test period. Once you verify the tool is working, extend the test period to 300 seconds for the most accurate results.
55-
5647
>[!NOTE]
5748
>Use the preceding commands only to test configuration.
5849
50+
>[!TIP]
51+
>When you run the test for the first time to verify setup, use a short test period to get quick feedback. Once you verify the tool is working, extend the test period to 300 seconds for the most accurate results.
52+
5953
### Run NTTTCP tests
6054

61-
1. On the receiver VM, start *ntttcp.exe* from the Windows command line, not from PowerShell. Run the following command, replacing the `<number of VM cores>`, and `<receiver IP address>` placeholders with your own values.
55+
Run *ntttcp.exe* from the Windows command line, not from PowerShell. Run the test for 300 seconds, or five minutes, on both the sender and receiver VMs. The sender and receiver must specify the same test duration for the `-t` parameter. Test duration defaults to 60 seconds if you don't specify a time parameter.
56+
57+
1. On the receiver VM, run the following command, replacing the `<number of VM cores>`, and `<receiver IP address>` placeholders with your own values.
6258

6359
```cmd
64-
ntttcp -r -m [<number of VM cores> * 2],*,<receiver IP address> -t 300
60+
ntttcp -r -m [<number of VM cores> x 2],*,<receiver IP address> -t 300
6561
```
6662

67-
The command for a VM with four cores and an IP address of `10.0.0.4` looks like the following example:
63+
The following example shows an NTTTCP command for a VM with four cores and an IP address of `10.0.0.4`.
6864

6965
`ntttcp -r -m 8,*,10.0.0.4 -t 300`
7066

71-
1. On the sender VM, run the following command from a Windows command line. The sender and receiver commands differ only in the `-s` or `-r` parameter that designates the sender or receiver VM.
67+
1. On the sender VM, run the following command. The sender and receiver commands differ only in the `-s` or `-r` parameter that designates the sender or receiver VM.
7268

7369
```cmd
74-
ntttcp -s -m [<number of VM cores> * 2],*,<receiver IP address> -t 300
70+
ntttcp -s -m [<number of VM cores> x 2],*,<receiver IP address> -t 300
7571
```
7672

77-
The following example shows the command if the receiver IP address is `10.0.0.4`:
73+
The following example shows the sender command for a receiver IP address of `10.0.0.4`.
7874

7975
```cmd
8076
ntttcp -s -m 8,*,10.0.0.4 -t 300 
@@ -88,29 +84,29 @@ Run the NTTTCP test for 300 seconds, or five minutes, on both the sender and rec
8884

8985
To measure throughput from Linux machines, use [NTTTCP-for-Linux](https://github.com/Microsoft/ntttcp-for-linux).
9086

91-
1. On both the sender and receiver VMs, run the following commands to prepare NTTTCP-for-Linux on your VMs, depending on your distro:
87+
1. Prepare both the sender and receiver VMs for NTTTCP-for-Linux by running the following commands, depending on your distro:
9288

93-
- For **CentOS**, install `gcc` and `git`:
89+
- For **CentOS**, install `gcc` and `git`.
9490

9591
``` bash
9692
yum install gcc -y
9793
yum install git -y
9894
```
9995

100-
- For **Ubuntu**, install `build-essential` and `git`:
96+
- For **Ubuntu**, install `build-essential` and `git`.
10197

10298
``` bash
10399
apt-get -y install build-essential
104100
apt-get -y install git
105101
```
106102

107-
- For **SUSE**, install `git-core`, `gcc`, and `make`:
103+
- For **SUSE**, install `git-core`, `gcc`, and `make`.
108104

109105
``` bash
110106
zypper in -y git-core gcc make
111107
```
112108

113-
1. Make and install NTTTCP-for-Linux:
109+
1. Make and install NTTTCP-for-Linux.
114110

115111
``` bash
116112
git clone https://github.com/Microsoft/ntttcp-for-linux
@@ -122,52 +118,51 @@ To measure throughput from Linux machines, use [NTTTCP-for-Linux](https://github
122118

123119
Run the NTTTCP test for 300 seconds, or five minutes, on both the sender VM and the receiver VM. The sender and receiver must specify the same test duration for the `-t` parameter. Test duration defaults to 60 seconds if you don't specify a time parameter.
124120
125-
1. On the receiver VM, start NTTTCP-for-Linux and run the test for 300 seconds.
121+
1. On the receiver VM, run NTTTCP-for-Linux for 300 seconds.
126122
127123
``` bash
128124
ntttcp -r -t 300
129125
```
130126
131-
1. On the sender VM, run NTTTCP-for-Linux for 300 seconds. The command for a receiver VM with an IP address of `10.0.0.4` looks like the following example:
127+
1. On the sender VM, run NTTTCP-for-Linux for 300 seconds. The following example shows a command for a receiver VM with an IP address of `10.0.0.4`.
132128
133129
``` bash
134130
ntttcp -s10.0.0.4 -t 300
135131
```
136132
137-
## Test throughput between Windows and Linux VMs
133+
---
134+
## Test throughput between a Windows VM and a Linux VM
138135
139-
To run NTTTCP throughput tests between a Windows and a Linux VM, enable no-sync mode by using the `-ns` flag on Windows or the `-N` flag on Linux.
136+
To run NTTTCP throughput tests between a Windows VM and a Linux VM, enable no-sync mode by using the `-ns` flag on Windows or the `-N` flag on Linux.
140137
141138
1. Install and configure NTTTCP on the Windows VM and NTTTCP-for-Linux on the Linux VM as instructed in the previous section.
142139
143-
1. Test throughput on both the Windows and the Linux machines, as follows:
144-
145-
From the Windows VM:
140+
1. Test throughput from the Windows or Linux VMs as follows:
146141
147-
- Test with the Windows VM as the receiver:
142+
- On the Windows VM, to test with the Windows VM as the receiver, run the following command:
148143
149144
```cmd
150-
ntttcp -r -m [<number of VM cores> * 2],*,<Linux VM IP>
145+
ntttcp -r -m [<number of VM cores> x 2],*,<Linux VM IP address>
151146
```
152-
- Test with the Windows VM as the sender:
147+
- On the Windows VM, to test with the Windows VM as the sender, run the following command:
153148
154149
```cmd
155-
ntttcp -s -m [<number of VM cores> * 2],*,<Linux VM IP> -ns -t 300
150+
ntttcp -s -m [<number of VM cores> x 2],*,<Linux VM IP address> -ns
156151
```
157152
158-
From the Linux VM:
159-
160-
- Test with the Linux VM as the receiver:
153+
- On the Linux VM, to test with the Linux VM as the receiver, run the following command:
161154
162155
```bash
163-
ntttcp -r -m [<number of VM cores> * 2],*,<Windows VM IP>
156+
ntttcp -r -m [<number of VM cores> x 2],*,<Windows VM IP address>
164157
```
165158
166-
- Test with the Linux VM as the sender:
159+
- On the Linux VM, to test with the Linux VM as the sender, run the following command:
167160
168161
```bash
169-
ntttcp -s -m [<number of VM cores> * 2],*,<Windows VM IP> -N -t 300
170-
```
162+
ntttcp -s -m [<number of VM cores> x 2],*,<Windows VM IP address> -N
163+
```
164+
165+
---
171166
172167
## Test Cloud Service instances
173168

articles/virtual-network/virtual-network-test-latency.md

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ ms.author: allensu
1515

1616
This article describes how to test network latency between Azure virtual machines (VMs) by using the publicly available tools [Latte](https://github.com/microsoft/latte) for Windows or [SockPerf](https://github.com/mellanox/sockperf) for Linux.
1717

18-
For the most accurate results, you should measure VM network latency with a tool that's designed for the task and excludes other types of latency, such as application latency. Latte and SockPerf provide the most relevant network latency results by focusing on Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) traffic. Most applications use these protocols, and they have the greatest effect on application performance.
18+
For the most accurate results, you should measure VM network latency with a tool that's designed for the task and excludes other types of latency, such as application latency. Latte and SockPerf provide the most relevant network latency results by focusing on Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) traffic. Most applications use these protocols, and this traffic has the largest effect on application performance.
1919

2020
Many other common network latency test tools, such as Ping, don't measure TCP or UDP traffic. Tools like Ping use Internet Control Message Protocol (ICMP), which can be treated differently from application traffic. ICMP test results don't directly apply to workloads that use TCP and UDP.
2121

22-
Latte and SockPerf measure only TCP or UDP payload delivery times. These tools don't measure ICMP or other packet types that applications don't use and that don't affect application performance.
22+
Latte and SockPerf measure only TCP or UDP payload delivery times. These tools don't measure ICMP and other packet types that applications don't use and that don't affect application performance.
2323

2424
Latte and SockPerf use the following approach to measure network latency between two physical or virtual computers:
2525

@@ -39,13 +39,13 @@ Use the following best practices to test and analyze network latency:
3939

4040
1. As soon as you finish deploying, configuring, and optimizing network VMs, take baseline network latency measurements between deployed VMs to establish benchmarks.
4141

42-
1. Test the effects of any of the following changes on network latency:
42+
1. Test the effects on network latency of changing any of the following components:
4343
- Operating system (OS) or network stack software, including configuration changes.
4444
- VM deployment method, such as deploying to an availability zone or proximity placement group (PPG).
4545
- VM properties, such as Accelerated Networking or size changes.
4646
- Virtual network configuration, such as routing or filtering changes.
4747

48-
1. Always compare new test results to the baseline or to the lasest test results before the controlled changes.
48+
1. Always compare new test results to the baseline or to the latest test results before controlled changes.
4949

5050
1. Repeat tests whenever you observe or deploy changes.
5151

@@ -67,7 +67,9 @@ Use the following procedures to install and test network latency with [Latte](ht
6767

6868
### Test latency between VMs
6969

70-
1. On the receiver VM, start *latte.exe* from the Windows command line, not from PowerShell. Run the following command, replacing the `<receiver IP address>`, `<port>`, and `<iterations>` placeholders with your own values.
70+
Run *latte.exe* from the Windows command line, not from PowerShell.
71+
72+
1. On the receiver VM, run the following command, replacing the `<receiver IP address>`, `<port>`, and `<iterations>` placeholders with your own values.
7173

7274
```cmd
7375
latte -a <receiver IP address>:<port> -i <iterations>
@@ -78,7 +80,7 @@ Use the following procedures to install and test network latency with [Latte](ht
7880

7981
For a VM with an IP address of `10.0.0.4`, the command might look like:<br><br>`latte -a 10.0.0.4:5005 -i 65100`
8082

81-
1. On the *sender* VM, start *latte.exe* from the command line. Run the same command as on the receiver, except with `-c` added to indicate the *client* or sender VM. Again replace the `<receiver IP address>`, `<port>`, and `<iterations>` placeholders with your own values.
83+
1. On the *sender* VM, run the same command as on the receiver, except with `-c` added to indicate the *client* or sender VM. Again replace the `<receiver IP address>`, `<port>`, and `<iterations>` placeholders with your own values.
8284

8385
```cmd
8486
latte -c -a <receiver IP address>:<port> -i <iterations>
@@ -96,32 +98,32 @@ Use the following procedures to install and test network latency with [Latte](ht
9698

9799
On both the *sender* and *receiver* Linux VMs, run the following commands to prepare SockPerf, depending on your Linux distro.
98100

99-
#### Red Hat Enterprise Linux (RHEL) or CentOS
100-
101-
```bash
102-
#RHEL/CentOS - Install Git and other helpful tools
103-
sudo yum install gcc -y -q
104-
sudo yum install git -y -q
105-
sudo yum install gcc-c++ -y
106-
sudo yum install ncurses-devel -y
107-
sudo yum install -y automake
108-
sudo yum install -y autoconf
109-
sudo yum install -y libtool
110-
```
111-
112-
#### Ubuntu
113-
114-
```bash
115-
#Ubuntu - Install Git and other helpful tools
116-
sudo apt-get install build-essential -y
117-
sudo apt-get install git -y -q
118-
sudo apt-get install -y autotools-dev
119-
sudo apt-get install -y automake
120-
sudo apt-get install -y autoconf
121-
sudo apt-get install -y libtool
122-
sudo apt update
123-
sudo apt upgrade
124-
```
101+
- Red Hat Enterprise Linux (RHEL) or CentOS:
102+
103+
```bash
104+
#RHEL/CentOS - Install Git and other helpful tools
105+
sudo yum install gcc -y -q
106+
sudo yum install git -y -q
107+
sudo yum install gcc-c++ -y
108+
sudo yum install ncurses-devel -y
109+
sudo yum install -y automake
110+
sudo yum install -y autoconf
111+
sudo yum install -y libtool
112+
```
113+
114+
- Ubuntu:
115+
116+
```bash
117+
#Ubuntu - Install Git and other helpful tools
118+
sudo apt-get install build-essential -y
119+
sudo apt-get install git -y -q
120+
sudo apt-get install -y autotools-dev
121+
sudo apt-get install -y automake
122+
sudo apt-get install -y autoconf
123+
sudo apt-get install -y libtool
124+
sudo apt update
125+
sudo apt upgrade
126+
```
125127

126128
### Copy, compile, and install SockPerf
127129

@@ -152,17 +154,17 @@ sudo make install
152154
sudo sockperf sr --tcp -i 10.0.0.4 -p 12345
153155
```
154156

155-
1. Now that the server is listening, on the *sender* or client computer, start sending packets to the server on the listening port, in this case `12345`.
156-
157-
- The `-t` option sets testing time in seconds. About 100 seconds is long enough to return representative results.
158-
- The `-m` denotes message size in bytes. A 350-byte message size is typical for an average packet. You can adjust the size higher or lower to more accurately represent your VM's workloads.
157+
1. Now that the receiver is listening, run the following command on the *sender* or client computer to send packets to the receiver on the listening port, in this case `12345`.
159158

160159
```bash
161160
#Client/Sender for IP 10.0.0.4:
162161
sockperf ping-pong -i 10.0.0.4 --tcp -m 350 -t 101 -p 12345 --full-rtt
163162
```
164163

165-
1. Wait for the results. Depending on how far apart the VMs are, the number of iterations varies. To test for success before you run longer tests, consider starting with shorter tests of about 5 seconds.
164+
- The `-t` option sets testing time in seconds. About 100 seconds is long enough to return representative results.
165+
- The `-m` denotes message size in bytes. A 350-byte message size is typical for an average packet. You can adjust the size to more accurately represent your VM's workloads.
166+
167+
1. Wait for the results. Depending on how far apart the VMs are, the number of iterations varies. To test for success before you run longer tests, consider starting with shorter tests of about five seconds.
166168

167169
---
168170

0 commit comments

Comments
 (0)