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/tune-network-workloads-on-bare-metal/1_setup.md
+46-25Lines changed: 46 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,58 +6,64 @@ weight: 2
6
6
layout: learningpathall
7
7
---
8
8
9
+
## Overview
9
10
10
-
## Overview
11
-
12
-
There are numerous client-server and network-based workloads, with Tomcat being a typical example of such applications. Tomcat provides services via HTTP/HTTPS network requests.
13
-
14
-
In this section, you will set up a benchmark environment using `Apache Tomcat` and `wrk2` to simulate an HTTP load and evaluate performance on an Arm-based bare metal instance. This Learning Path was tested on an AWS `c8g.metal-48xl` instance.
11
+
Tomcat is a common client–server web workload that serves HTTP/HTTPS requests. In this section, you will set up a benchmarking environment using Apache Tomcat (server) and `wrk2` (client) to generate load and measure performance on an Arm-based bare‑metal instance. This Learning Path was validated on an AWS `c8g.metal‑48xl` instance running Ubuntu 24.04.
15
12
16
13
## Set up the Tomcat benchmark server
17
-
[Apache Tomcat](https://tomcat.apache.org/) is an open-source Java Servlet container that runs Java web applications, handles HTTP requests, and serves dynamic content. It supports technologies such as Servlet, JSP, and WebSocket.
14
+
15
+
[Apache Tomcat](https://tomcat.apache.org/) is an open‑source Java Servlet container for running Java web applications, handling HTTP requests, and serving dynamic content. It supports Servlet, JSP, and WebSocket.
18
16
19
17
## Install the Java Development Kit (JDK)
20
18
21
-
Install OpenJDK 21 on your Arm-based Ubuntu 24.04 bare-metal instance:
19
+
Install OpenJDK 21 on your Arm‑based Ubuntu 24.04 bare‑metal instance:
Alternatively, you can build Tomcat [from source](https://github.com/apache/tomcat).
37
36
38
37
## Enable access to Tomcat examples
39
38
40
-
To access the built-in examples from your local network or external IP, use a text editor to modify the `context.xml` file by updating the `RemoteAddrValve` configuration to allow all IP addresses.
39
+
To access the built‑in examples from your local network or external IP, modify the `context.xml` file and update `RemoteAddrValve` to allow your clients.
Allowing `.*` permits access from all IP addresses and should be used only in isolated lab environments. Restrict this setting to trusted CIDR ranges for production or shared networks.
61
+
{{% /notice %}}
57
62
58
63
## Start the Tomcat server
64
+
59
65
{{% notice Note %}}
60
-
To achieve maximum performance of Tomcat, the maximum number of file descriptors that a single process can open simultaneously should be sufficiently large.
66
+
For maximum performance, ensure the per‑process limit for open file descriptors is sufficient.
Using CATALINA_BASE: /home/ubuntu/apache-tomcat-11.0.10
@@ -80,24 +86,30 @@ Tomcat started.
80
86
81
87
## Confirm server access
82
88
83
-
In your browser, open: `http://${tomcat_ip}:8080/examples`.
89
+
Replace `${tomcat_ip}` with the public or private IP address of your Arm server and open:
90
+
91
+
```
92
+
http://${tomcat_ip}:8080/examples
93
+
```
84
94
85
95
You should see the Tomcat welcome page and examples, as shown below:
86
96
87
-

97
+

88
98
89
99

90
100
91
-
{{% notice Note %}}Make sure port 8080 is open in the security group of the IP address for your Arm-based Linux machine.{{% /notice%}}
101
+
{{% notice Note %}}
102
+
Ensure port **8080** is open in the security group or firewall for your Arm‑based Linux machine.
103
+
{{% /notice %}}
92
104
93
105
## Set up the benchmarking client using wrk2
94
106
[Wrk2](https://github.com/giltene/wrk2) is a high-performance HTTP benchmarking tool specialized in generating constant throughput loads and measuring latency percentiles for web services. `wrk2` is an enhanced version of `wrk` that provides accurate latency statistics under controlled request rates, ideal for performance testing of HTTP servers.
95
107
96
108
{{% notice Note %}}
97
-
Currently `wrk2` is only supported on x86 machines. Run the benchmark client steps below on a baremetal `x86_64` server running Ubuntu 24.04
109
+
Currently,`wrk2` is only supported on x86_64 machines. Run the client steps below on a bare‑metal x86_64 server running Ubuntu 24.04.
Move the binary to a directory in your system’s PATH:
120
-
131
+
Move the binary to a directory in your system’s `PATH`:
132
+
121
133
```bash
122
134
sudo cp wrk /usr/local/bin
123
135
```
124
136
125
137
## Run the benchmark
138
+
126
139
{{% notice Note %}}
127
-
To achieve maximum performance of wrk2, the maximum number of file descriptors that a single process can open simultaneously should be sufficiently large.
140
+
As with Tomcat, set a high open‑files limit to avoid hitting FD caps during the run.
128
141
{{% /notice %}}
129
142
130
-
Use the following command to benchmark the HelloWorld servlet running on Tomcat:
143
+
Benchmark the `HelloWorld` servlet running on Tomcat:
0 commit comments