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: content/learning-paths/servers-and-cloud-computing/microbenchmark-network-iperf3/_index.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
---
2
2
title: Microbenchmark and tune network performance with iPerf3 and Linux traffic control
3
3
4
-
whminutes_to_complete: 30
4
+
minutes_to_complete: 30
5
5
6
-
who_is_this_for: This is an introductory topic for performance engineers, Linux system administrators, or application developers who want to microbenchmark, simulate, or tune the networking performance of distributed systems.
6
+
who_is_this_for: This is an introductory topic for performance engineers, Linux system administrators, and application developers who want to microbenchmark, simulate, or tune the networking performance of distributed systems.
7
7
8
8
learning_objectives:
9
-
- Understand how to use iPerf3 for network microbenchmarking.
10
-
- Use Linux Traffic Control (TC) to simulate different network conditions.
11
-
- Identify and apply basic runtime parameters to tune performance.
9
+
- Run accurate network microbenchmark tests using iPerf3.
10
+
- Simulate real-world network conditions using Linux Traffic Control (tc).
11
+
- Tune basic Linux kernel parameters to improve network performance.
12
12
13
13
prerequisites:
14
-
- Foundational understanding of networking principles such as TCP/IP and UDP.
14
+
- Basic understanding of networking principles such as Transmission Control Protocol/Internet Protocol (TCP/IP) and User Datagram Protocol (UDP).
15
15
- Access to two [Arm-based cloud instances](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/).
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/microbenchmark-network-iperf3/basic-microbenchmarking.md
+36-14Lines changed: 36 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,19 @@ weight: 3
6
6
layout: learningpathall
7
7
---
8
8
9
-
With your systems configured and reachable, you can now use iPerf3 to microbenchmark TCP and UDP performance between your Arm-based systems
9
+
With your systems configured and reachable, you can now use iPerf3 to microbenchmark TCP and UDP performance between your Arm-based systems.
10
10
11
11
## Microbenchmark the TCP connection
12
12
13
-
First, start by running `iperf` in server mode on the `SERVER` system with the following command:
13
+
Start by running `iperf` in server mode on the `SERVER` system:
14
14
15
15
```bash
16
16
iperf3 -s
17
17
```
18
18
19
-
This starts the server on the default TCP port 5201. You should see:
19
+
This starts the server on the default TCP port 5201.
@@ -25,23 +27,23 @@ Server listening on 5201 (test #1)
25
27
26
28
```
27
29
28
-
The default server port is 5201. Use the `-p` flag to specify another port if it is in use.
30
+
The default server port is 5201. If it is already in use, use the `-p` flag to specify another.
29
31
30
32
{{% notice Tip %}}
31
-
If you already have an `iperf3` server running, you can kill the process with the following command:
33
+
If you already have an `iperf3` server running, terminate it with:
32
34
```bash
33
35
sudo kill$(pgrep iperf3)
34
36
```
35
37
{{% /notice %}}
36
38
37
39
## Run a TCP test from the client
38
40
39
-
Next, on the client node, run the following command to run a simple 10-second microbenchmark using the TCP protocol:
41
+
On the client node, run the following command to run a simple 10-second microbenchmark using the TCP protocol:
40
42
41
43
```bash
42
-
iperf3 -c SERVER -V
44
+
iperf3 -c SERVER -v
43
45
```
44
-
Replace `SERVER` with your server’s IP address or hostname. The -V flag enables verbose output.
46
+
Replace `SERVER` with your server’s hostname or private IP address. The `-v` flag enables verbose output.
45
47
46
48
The output is similar to:
47
49
@@ -85,15 +87,33 @@ iperf Done.
85
87
86
88
## UDP result highlights
87
89
88
-
You can also microbenchmark the `UDP` protocol with the `-u` flag. As a reminder, UDP does not guarantee packet delivery with some packets being lost. As such you need to observe the statistics on the server side to see the percent of packets lost and the variation in packet arrival time (jitter). The UDP protocol is widely used in applications that need timely packet delivery, such as online gaming and video calls.
90
+
You can also microbenchmark the `UDP` protocol using the `-u` flag with iPerf3. Unlike TCP, UDP does not guarantee packet delivery which means some packets might be lost in transit.
91
+
92
+
To evaluate UDP performance, focus on the server-side statistics, particularly:
93
+
94
+
* Packet loss percentage
95
+
96
+
* Jitter (variation in packet arrival time)
97
+
98
+
These metrics help assess reliability and responsiveness under real-time conditions.
99
+
100
+
UDP is commonly used in latency-sensitive applications such as:
89
101
90
-
Run the following command from the client to send 2 parallel UDP streams with the `-P 2` option.
102
+
* Online gaming
103
+
104
+
* Voice over IP (VoIP)
105
+
106
+
* Video conferencing and streaming
107
+
108
+
Because it avoids the overhead of retransmission and ordering, UDP is ideal for scenarios where timely delivery matters more than perfect accuracy.
109
+
110
+
Run the following command from the client to send two parallel UDP streams with the `-P 2` option:
91
111
92
112
```bash
93
-
iperf3 -c SERVER -V -u -P 2
113
+
iperf3 -c SERVER -v -u -P 2
94
114
```
95
115
96
-
Looking at the server output you observe 0% of packets where lost for the short test.
116
+
Look at the server output and you can see that none (0%) of packets were lost for the short test:
97
117
98
118
```output
99
119
[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
@@ -102,8 +122,10 @@ Looking at the server output you observe 0% of packets where lost for the short
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/microbenchmark-network-iperf3/setup.md
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,21 +6,23 @@ weight: 2
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Configure two Arm-based Linux computers
9
+
## Environment setup and Learning Path focus
10
10
11
-
To benchmark bandwidth and latency between Arm-based systems, you'll need to configure two Linux machines running on Arm. You can use AWS EC2 instances with Graviton processors, or Linux virtual machines from any other cloud service provider.
11
+
To benchmark bandwidth and latency between Arm-based systems, you'll need to configure two Linux machines running on Arm.
12
12
13
-
This tutorial also walks you through a local-to-cloud test to compare performance between:
13
+
You can use AWS EC2 instances with Graviton processors, or Linux virtual machines from any other cloud service provider.
14
+
15
+
This tutorial walks you through a local-to-cloud test to compare performance between:
14
16
15
17
* Two cloud-based instances
16
18
* One local system and one cloud instance
17
19
18
20
The setup instructions below use AWS EC2 instances connected within a Virtual Private Cloud (VPC).
19
21
20
-
To get started, create two Arm-based Linux instances, with each instance serving one role:
22
+
To get started, create two Arm-based Linux instances, with each instance serving a distinct role:
21
23
22
-
* One acting as a server
23
24
* One acting as a client
25
+
* One acting as a server
24
26
25
27
The instructions below use two `t4g.xlarge` instances running Ubuntu 24.04 LTS.
26
28
@@ -43,15 +45,15 @@ If you're prompted to run `iperf3` as a daemon, answer "no".
43
45
44
46
If you're working in a cloud environment like AWS, you must update the default security rules to enable specific inbound and outbound protocols.
45
47
46
-
Using the AWS console, follow these instructions:
48
+
To do this, follow these instructions below using the AWS console:
47
49
48
50
* Navigate to the **Security** tab for each instance.
49
-
*Edit the **Inbound rules** to allow the following protocols:
51
+
*Configure the **Inbound rules** to allow the following protocols:
50
52
*`ICMP` (for ping)
51
53
* All UDP ports (for UDP tests)
52
54
* TCP port 5201 (for traffic to enable communication between the client and server systems)
For secure internal communication, set the source to your instance’s security group. This avoids exposing traffic to the internet while allowing traffic between your systems.
@@ -67,7 +69,7 @@ You can restrict the range further by:
67
69
68
70
To avoid using IP addresses directly, add the other system's IP address to the `/etc/hosts` file.
69
71
70
-
You can find private IPs in the AWS dashboard or by running:
72
+
You can find private IPs in the AWS dashboard, or by running:
71
73
72
74
```bash
73
75
hostname -I
@@ -77,7 +79,7 @@ ifconfig
77
79
78
80
### On the client
79
81
80
-
Add the server's IP address and assign it the name `SERVER`:
82
+
Add the server's IP address, and assign it the name `SERVER`:
81
83
82
84
```output
83
85
127.0.0.1 localhost
@@ -86,7 +88,7 @@ Add the server's IP address and assign it the name `SERVER`:
86
88
87
89
### On the server
88
90
89
-
Add the client's IP address and assign it the name `CLIENT`:
91
+
Add the client's IP address, and assign it the name `CLIENT`:
90
92
91
93
```output
92
94
127.0.0.1 localhost
@@ -101,17 +103,17 @@ Add the client's IP address and assign it the name `CLIENT`:
101
103
102
104
103
105
104
-
## Confirm server is reachable
106
+
## Confirm the server is reachable
105
107
106
-
Finally, confirm the client can reach the server by using the ping command below. As a reference, you can also ping the localhost.
108
+
Finally, confirm the client can reach the server by using the ping command below. If required, you can also ping the localhost:
107
109
108
110
```bash
109
111
ping SERVER -c 3 && ping 127.0.0.1 -c 3
110
112
```
111
113
112
114
The output below shows that both SERVER and localhost (127.0.0.1) are reachable.
113
115
114
-
Localhost response times are typically ~10× faster than remote systems, though actual values will vary based on system location and network conditions.
116
+
Localhost response times are typically ~10× faster than remote systems, though actual values vary based on system location and network conditions.
115
117
116
118
```output
117
119
PING SERVER (10.248.213.104) 56(84) bytes of data.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/microbenchmark-network-iperf3/simulating-network-conditions.md
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/microbenchmark-network-iperf3/tuning.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ weight: 5
6
6
layout: learningpathall
7
7
---
8
8
9
-
You can further optimize network performance by adjusting Linux kernel parameters and testing across different environments—including local-to-cloud scenarios.
9
+
You can further optimize network performance by adjusting Linux kernel parameters and testing across different environments, including local-to-cloud scenarios.
10
10
11
11
## Connect from a local machine
12
12
@@ -24,7 +24,7 @@ Running iPerf3 on the local machine and connecting to the cloud server shows a l
24
24
Run this command on your local computer:
25
25
26
26
```bash
27
-
iperf3 -c <server-public-IP> -V
27
+
iperf3 -c <server-public-IP> -v
28
28
```
29
29
30
30
Compared to over 2 Gbit/sec within AWS, this test shows a reduced bitrate (~157 Mbit/sec) due to longer round-trip times (for example, >40ms).
@@ -75,7 +75,7 @@ iperf3 -s
75
75
Now rerun iPerf3 again on your local machine:
76
76
77
77
```bash
78
-
iperf3 -c <server-public-IP> -V
78
+
iperf3 -c <server-public-IP> -v
79
79
```
80
80
81
81
Without changing anything on the client, the throughput improved by over 60%.
@@ -91,9 +91,7 @@ Test Complete. Summary Results:
91
91
You’ve now completed a guided introduction to:
92
92
93
93
* Network performance microbenchmarking
94
-
95
94
* Simulating real-world network conditions
96
-
97
95
* Tuning kernel parameters for high-latency links
98
96
99
-
* Explore further by testing other parameters, tuning for specific congestion control algorithms, or integrating these benchmarks into CI pipelines for continuous performance evaluation.
97
+
You can now explore this area further by testing other parameters, tuning for specific congestion control algorithms, or integrating these benchmarks into CI pipelines for continuous performance evaluation.
0 commit comments