You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-network/virtual-network-bandwidth-testing.md
+42-47Lines changed: 42 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Test Azure VM network throughput by using NTTTCP
2
+
title: Test VM network throughput by using NTTTCP
3
3
description: Use the NTTTCP tool to test network bandwidth and throughput performance for Windows and Linux VMs on a virtual network.
4
4
services: virtual-network
5
5
author: asudbring
@@ -10,71 +10,67 @@ ms.date: 03/23/2023
10
10
ms.author: allensu
11
11
---
12
12
13
-
# Test network bandwidth or throughput with NTTTCP
13
+
# Test VM network throughput by using NTTTCP
14
14
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.
16
16
17
17
## Prerequisites
18
18
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.
20
20
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.
22
22
23
23
>[!NOTE]
24
24
>Testing by using a virtual IP (VIP) is possible, but is beyond the scope of this article.
25
25
26
-
## Test throughput for Windows or Linux VMs
26
+
## Test throughput between Windows VMs or Linux VMs
27
27
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).
31
29
32
30
# [Windows](#tab/windows)
33
31
34
32
### Set up NTTTPS and test configuration
35
33
36
34
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*.
37
35
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.
1. To confirm your configuration, test a single Transfer Control Protocol (TCP) stream for 10 seconds by running the following commands:
49
43
50
44
- On the receiver VM, run `ntttcp -r -t 10 -P 1`.
51
45
- On the sender VM, run `ntttcp -s<receiver IP address> -t 10 -n 1 -P 1`.
52
46
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
-
56
47
>[!NOTE]
57
48
>Use the preceding commands only to test configuration.
58
49
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
+
59
53
### Run NTTTCP tests
60
54
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.
62
58
63
59
```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
65
61
```
66
62
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`.
68
64
69
65
`ntttcp -r -m 8,*,10.0.0.4 -t 300`
70
66
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.
72
68
73
69
```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
75
71
```
76
72
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`.
78
74
79
75
```cmd
80
76
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
88
84
89
85
To measure throughput from Linux machines, use [NTTTCP-for-Linux](https://github.com/Microsoft/ntttcp-for-linux).
90
86
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:
92
88
93
-
- For **CentOS**, install `gcc` and `git`:
89
+
- For **CentOS**, install `gcc` and `git`.
94
90
95
91
```bash
96
92
yum install gcc -y
97
93
yum install git -y
98
94
```
99
95
100
-
- For **Ubuntu**, install `build-essential` and `git`:
96
+
- For **Ubuntu**, install `build-essential` and `git`.
101
97
102
98
``` bash
103
99
apt-get -y install build-essential
104
100
apt-get -y install git
105
101
```
106
102
107
-
- For **SUSE**, install `git-core`, `gcc`, and `make`:
103
+
- For **SUSE**, install `git-core`, `gcc`, and `make`.
@@ -122,52 +118,51 @@ To measure throughput from Linux machines, use [NTTTCP-for-Linux](https://github
122
118
123
119
Run the NTTTCP testfor 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.
124
120
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.
126
122
127
123
``` bash
128
124
ntttcp -r -t 300
129
125
```
130
126
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`.
132
128
133
129
``` bash
134
130
ntttcp -s10.0.0.4 -t 300
135
131
```
136
132
137
-
## Test throughput between Windows and Linux VMs
133
+
---
134
+
## Test throughput between a Windows VM and a Linux VM
138
135
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.
140
137
141
138
1. Install and configure NTTTCP on the Windows VM and NTTTCP-for-Linux on the Linux VM as instructed in the previous section.
142
139
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:
146
141
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:
148
143
149
144
```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>
151
146
```
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:
153
148
154
149
```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
156
151
```
157
152
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:
161
154
162
155
```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>
164
157
```
165
158
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:
167
160
168
161
```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
Copy file name to clipboardExpand all lines: articles/virtual-network/virtual-network-test-latency.md
+39-37Lines changed: 39 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,11 @@ ms.author: allensu
15
15
16
16
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.
17
17
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.
19
19
20
20
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.
21
21
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.
23
23
24
24
Latte and SockPerf use the following approach to measure network latency between two physical or virtual computers:
25
25
@@ -39,13 +39,13 @@ Use the following best practices to test and analyze network latency:
39
39
40
40
1. As soon as you finish deploying, configuring, and optimizing network VMs, take baseline network latency measurements between deployed VMs to establish benchmarks.
41
41
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:
43
43
- Operating system (OS) or network stack software, including configuration changes.
44
44
- VM deployment method, such as deploying to an availability zone or proximity placement group (PPG).
45
45
- VM properties, such as Accelerated Networking or size changes.
46
46
- Virtual network configuration, such as routing or filtering changes.
47
47
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.
49
49
50
50
1. Repeat tests whenever you observe or deploy changes.
51
51
@@ -67,7 +67,9 @@ Use the following procedures to install and test network latency with [Latte](ht
67
67
68
68
### Test latency between VMs
69
69
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.
71
73
72
74
```cmd
73
75
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
78
80
79
81
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`
80
82
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.
82
84
83
85
```cmd
84
86
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
96
98
97
99
On both the *sender* and *receiver* Linux VMs, run the following commands to prepare SockPerf, depending on your Linux distro.
98
100
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
+
```
125
127
126
128
### Copy, compile, and install SockPerf
127
129
@@ -152,17 +154,17 @@ sudo make install
152
154
sudo sockperf sr --tcp -i 10.0.0.4 -p 12345
153
155
```
154
156
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`.
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.
0 commit comments