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/java-on-azure/_index.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,23 +7,21 @@ cascade:
7
7
8
8
minutes_to_complete: 30
9
9
10
-
who_is_this_for: This Learning Path introduces Java deployment on Microsoft Azure Cobalt 100 (Arm-based) virtual machines. It is designed for developers migrating Java applications from x86_64 to Arm with minimal or no changes.
10
+
who_is_this_for: This is an introductory topic about Java deployment and benchmarking on Microsoft Azure Cobalt 100 (Arm-based) virtual machines. It is designed for developers migrating Java applications from x86_64 to Arm.
11
11
12
12
learning_objectives:
13
-
- Provision an Azure Arm64 virtual machine using Azure console, with Ubuntu Pro 24.04 LTS as the base image.
14
-
- Deploy Java on the Ubuntu Pro virtual machine.
15
-
- Perform Java baseline testing and benchmarking on both x86_64 and Arm64 virtual machines.
13
+
- Provision an Azure Arm-based Cobalt 100 virtual machine using Azure console, with Ubuntu Pro 24.04 LTS as the base image.
14
+
- Deploy Java on the Azure Arm64 virtual machine.
15
+
- Perform Java baseline testing and benchmarking on the Arm64 virtual machines.
16
16
17
17
prerequisites:
18
18
- A [Microsoft Azure](https://azure.microsoft.com/) account with access to Cobalt 100 based instances (Dpsv6).
19
-
- Basic understanding of Linux command line.
20
-
- Familiarity with the [Java platform](https://openjdk.org/) and deployment practices on Arm64 platforms.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/java-on-azure/baseline.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,20 @@ layout: learningpathall
7
7
---
8
8
9
9
10
-
### Deploy a Java application with Tomcat-like operation
11
-
Apache Tomcat is a Java-based web application server (technically, a Servlet container) that executes Java web applications. It's widely used to host Java servlets, JSP (JavaServer Pages),
12
-
and RESTful APIs written in Java.
10
+
### Deploy a Java application with a Tomcat-like operation
11
+
Apache Tomcat is a widely used Java web application server. Technically, it is a Servlet container, responsible for executing Java servlets and supporting technologies like:
13
12
14
-
The below Java class simulates the generation of a basic HTTP response and measures the time taken to construct it, mimicking a lightweight Tomcat-like operation. It measures how long it
15
-
takes to build the response string, helping evaluate raw Java execution efficiency before deploying heavier frameworks like Tomcat.
13
+
* JSP (JavaServer Pages): Java-based templates for dynamic web content.
14
+
* RESTful APIs: Lightweight endpoints for modern microservices.
16
15
17
-
Create a file named `HttpSingleRequestTest.java`, and add the below content to it:
16
+
In production, frameworks like Tomcat introduce additional complexity (request parsing, thread management, I/O handling). Before layering those components, it's useful to measure how efficiently raw Java executes simple request/response logic on Azure Cobalt 100 Arm-based instances.
17
+
18
+
In this section, you will run a minimal Tomcat-like simulation. It won't launch a real server, but instead it:
19
+
* Constructs a basic HTTP response string in memory.
20
+
* Measures the time taken to build that response, acting as a microbenchmark.
21
+
* Provides a baseline for raw string and I/O handling performance in Java.
22
+
23
+
Using a file editor of your choice create a file named `HttpSingleRequestTest.java`, and add the content below to it:
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/java-on-azure/benchmarking.md
+62-34Lines changed: 62 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,21 @@ weight: 6
6
6
layout: learningpathall
7
7
---
8
8
9
-
Now that you’ve built and run the Tomcat-like response, you can use it to test the JVM performance using JMH. You can also use it to test the performance difference between Cobalt 100 instances and other similar D series x86_64 based instances.
10
-
## Run the performance tests using JMH
9
+
Now that you have built and run a Tomcat-like response in Java, the next step is to benchmark it using a reliable, JVM-aware framework.
11
10
12
-
JMH (Java Microbenchmark Harness) is a Java benchmarking framework developed by the JVM team at Oracle to measure the performance of small code snippets with high precision. It accounts for JVM optimizations like JIT and warm-up to ensure accurate and reproducible results. It measures the throughput, average latency, or execution time. Below steps help benchmark the Tomcat-like operation:
11
+
## Run performance tests using JMH
12
+
13
+
JMH (Java Microbenchmark Harness) is a Java benchmarking framework developed by the JVM team at Oracle to measure the performance of small code snippets with high precision. It accounts for JVM optimizations like JIT and warm-up to ensure accurate and reproducible results. You can measure throughput (ops/sec), average execution time, or percentiles for latency.
14
+
15
+
Follow the steps to help benchmark the Tomcat-like operation with JMH:
13
16
14
17
15
18
Install Maven:
16
19
17
20
```console
18
21
sudo apt install maven -y
19
22
```
20
-
Create Benchmark Project:
23
+
Once Maven is installed, create a JMH benchmark project using the official archetype provided by OpenJDK:
Edit the `src/main/java/com/example/MyBenchmark.java` file and add the below code on it:
60
+
Now edit the `src/main/java/com/example/MyBenchmark.java` file in the generated project. Replace the placeholder `TestMethod()` function with the following code:
35
61
36
62
```java
37
63
packagecom.example;
@@ -56,23 +82,36 @@ public class MyBenchmark {
56
82
}
57
83
}
58
84
```
59
-
This simulates HTTP response generation similar to Tomcat.
85
+
This mirrors the Tomcat-like simulation you created earlier but now runs under JMH.
60
86
61
-
Build the Benchmark:
87
+
Build the Benchmark JAR:
62
88
63
89
```console
64
90
mvn clean install
65
91
```
66
92
67
-
After the build is complete, the JMH benchmark jar will be in the target/ directory.
93
+
The output from this command should look like:
94
+
95
+
```output
96
+
[INFO] Installing /home/azureuser/jmh-benchmark/target/jmh-benchmark-1.0.jar to /home/azureuser/.m2/repository/com/example/jmh-benchmark/1.0/jmh-benchmark-1.0.jar
97
+
[INFO] Installing /home/azureuser/jmh-benchmark/pom.xml to /home/azureuser/.m2/repository/com/example/jmh-benchmark/1.0/jmh-benchmark-1.0.pom
After the build is complete, the JMH benchmark JAR will be located in the target directory.
68
106
69
107
Run the Benchmark:
70
108
71
109
```console
72
110
java -jar target/benchmarks.jar
73
111
```
112
+
This will execute the benchmarkHttpResponse() method under JMH, showing average time per operation.
74
113
75
-
You should see an output similar to:
114
+
You should see output similar to:
76
115
```output
77
116
# JMH version: 1.37
78
117
# VM version: JDK 21.0.8, OpenJDK 64-Bit Server VM, 21.0.8+9-Ubuntu-0ubuntu124.04.1
@@ -160,6 +199,9 @@ Result "com.example.MyBenchmark.benchmarkHttpResponse":
160
199
161
200
# Run complete. Total time: 00:08:21
162
201
202
+
JMH runs warmup iterations so the JVM has a chance to JIT-compile and optimize the code before the real measurement begins.
203
+
Each iteration shows how many times per second your `benchmarkHttpResponse()` method ran. You get an aggregate summary of the result at the end. In this example, on average the JVM executed ~35.6 million response constructions per second.
204
+
163
205
REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on
164
206
why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial
165
207
experiments, perform baseline and negative tests that provide experimental control, make sure
-**Run Count**: The total number of benchmark iterations executed. A higher run count increases statistical reliability and reduces the effect of outliers.
182
-
-**Average Throughput**: The mean number of operations executed per second across all iterations. This metric represents the overall sustained performance of the benchmarked workload.
223
+
-**Run Count**: The total number of benchmark iterations that JMH executed. More runs improve statistical reliability and help smooth out anomalies caused by the JVM or OS.
224
+
-**Average Throughput**: The mean number of operations completed per second across all measured iterations. This is the primary indicator of sustained performance for the benchmarked code.
183
225
-**Standard Deviation**: Indicates the amount of variation or dispersion from the average throughput. A smaller standard deviation means more consistent performance.
184
-
-**Confidence Interval (99.9%)**: The statistical range within which the true average throughput is expected to fall, with 99.9% certainty. Narrow intervals imply more reliable results.
185
-
-**Min Throughput**: The lowest throughput observed across all iterations, reflecting the worst-case performance scenario.
186
-
-**Max Throughput**: The highest throughput observed across all iterations, reflecting the best-case performance scenario.
226
+
-**Confidence Interval (99.9%)**: The statistical range in which the true average throughput is expected to fall with 99.9% certainty. Narrow confidence intervals suggest more reliable and repeatable measurements.
227
+
-**Min Throughput**: The lowest observed throughput across all iterations, representing a worst-case scenario under the current test conditions.
228
+
-**Max Throughput**: The highest observed throughput across all iterations, representing the best-case performance under the current test conditions.
187
229
188
230
### Benchmark summary on Arm64
189
231
@@ -198,26 +240,12 @@ Here is a summary of benchmark results collected on an Arm64 **D4ps_v6 Ubuntu Pr
198
240
|**Min Throughput**| 33.53M ops/sec |
199
241
|**Max Throughput**| 36.99M ops/sec |
200
242
201
-
### Benchmark summary on x86
202
-
203
-
Here is a summary of benchmark results collected on x86 **D4s_v6 Ubuntu Pro 24.04 LTS virtual machine**.
When comparing the results on Arm64 vs x86_64 virtual machines:
244
+
### Key insights from the results
218
245
219
-
-**High Throughput:** Achieved an average of **35.66M ops/sec**, with peak performance reaching **36.99M ops/sec**.
220
-
-**Stable Performance:** Standard deviation of **±0.92M ops/sec**, with results tightly bounded within the 99.9% confidence interval **[34.97M, 36.34M]**.
221
-
-**Consistent Efficiency:** Demonstrates the reliability of Arm64 architecture for sustaining high-throughput Java workloads on Azure Ubuntu Pro environments.
246
+
-**Strong throughput performance** The benchmark sustained around 35.6 million operations per second, demonstrating efficient string construction and memory handling on the Arm64 JVM.
247
+
-**Consistency across runs** With a standard deviation under 1 million ops/sec, results were tightly clustered. This suggests stable system performance without significant noise from background processes.
-**Predictable performance envelope** The difference between min (33.5M) and max (37.0M) throughput is modest (~10%), suggests the workload performed consistently without extreme slowdowns or spikes.
222
250
223
-
You have now benchmarked Java on an Azure Cobalt 100 Arm64 virtual machine and compared results with x86_64.
251
+
The Arm-based Azure `D4ps_v6` VM provides stable and efficient performance for Java workloads, even in microbenchmark scenarios. These results establish a baseline you can now compare directly against x86_64 instances to evaluate relative performance.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/java-on-azure/create-instance.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,13 @@ weight: 3
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Introduction
9
+
## Create an Azure Cobalt 100 Arm64 VM using the Azure portal
10
10
11
-
There are several ways to create an Arm-based Cobalt 100 virtual machine : the Microsoft Azure console, the Azure CLI tool, or using your choice of IaC (Infrastructure as Code). This guide will use the Azure console to create a virtual machine with Arm-based Cobalt 100 Processor.
11
+
You can create an Azure Cobalt 100 Arm64 virtual machine in several ways, including the Azure portal, the Azure CLI, or an Infrastructure as Code (IaC) tool.
12
12
13
-
This learning path focuses on the general-purpose virtual machine of the D series. Please read the guide on [Dpsv6 size series](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/dpsv6-series) offered by Microsoft Azure.
13
+
In this Learning Path, you’ll use the Azure portal to create a VM with the Cobalt 100 processor, following a process similar to creating any other virtual machine in Azure.
14
14
15
-
If you have never used the Microsoft Cloud Platform before, please review the microsoft [guide to Create a Linux virtual machine in the Azure portal](https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu).
16
-
17
-
#### Create an Arm-based Azure Virtual Machine
15
+
## Step-by-step: create the virtual machine
18
16
19
17
Creating a virtual machine based on Azure Cobalt 100 is no different from creating any other virtual machine in Azure. To create an Azure virtual machine, launch the Azure portal and navigate to "Virtual Machines".
20
18
1. Select "Create", and click on "Virtual Machine" from the drop-down list.
@@ -35,7 +33,7 @@ Creating a virtual machine based on Azure Cobalt 100 is no different from creati
35
33
36
34

37
35
38
-
10. Finally, when you are confident about your selection, click on the "Create" button, and click on the "Download Private key and Create Resources" button.
36
+
10. Finally, click on the "Create" button, and click on the "Download Private key and Create Resources" button.
39
37
40
38

Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/java-on-azure/deploy.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,25 +9,24 @@ layout: learningpathall
9
9
10
10
11
11
## Java Installation on Azure Ubuntu Pro virtual machine
12
-
Install Java on Ubuntu Pro virtual machine by updating the system and installing `default-jdk`, which includes both JRE and JDK. Verify the installation using `java -version` and `javac -version`, then set the `JAVA_HOME` environment variable for Arm-based systems.
12
+
In this section, you will install Java on your Arm-based Ubuntu Pro virtual machine. The goal is to ensure you have both the Java Runtime Environment (JRE) for running Java applications and the Java Development Kit (JDK) for compiling code and running benchmarks.
13
13
14
14
15
15
### Install Java
16
16
17
+
You will install Java using the Ubuntu package manager. `default-jdk` installs both the default JRE and JDK provided by Azure Ubuntu Pro machine.
17
18
```console
18
19
sudo apt update
19
20
sudo apt install -y default-jdk
20
21
```
21
22
22
-
`default-jdk` installs both the default JRE and JDK provided by Azure Ubuntu Pro machine.
23
-
24
-
Check to ensure that the JRE is properly installed:
23
+
Verify your JRE installation:
25
24
26
25
```console
27
26
java -version
28
27
```
29
28
30
-
You should see an output similar to:
29
+
You should the JRE version printed:
31
30
32
31
```output
33
32
openjdk version "21.0.8" 2025-07-15
@@ -40,13 +39,13 @@ Check to ensure that the JDK is properly installed:
40
39
```console
41
40
javac -version
42
41
```
43
-
You should see an output similar to:
42
+
The output should look similar to:
44
43
45
44
```output
46
45
javac 21.0.8
47
46
```
48
47
49
-
Set Java Environment Variable for Arm:
48
+
Set the Java Environment Variables to point to the root directory of your JDK installation:
Ubuntu Pro 24.04 LTS offers the default JDK version 21.0.8. It’s important to ensure that your version of OpenJDK for Arm is at least 11.0.9, or above. There is a large performance gap between OpenJDK-11.0.8 and OpenJDK 11.0.9. A patch added in 11.0.9 reduces false-sharing cache contention.
59
58
For more information, you can view this [Arm community blog](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/java-performance-on-neoverse-n1).
60
59
61
-
The [Arm Ecosystem Dashboard](https://developer.arm.com/ecosystem-dashboard/)also recommends Java/OpenJDK version 11.0.9 as minimum recommended on the Arm platforms.
60
+
You can also refer to the [Arm Ecosystem Dashboard](https://developer.arm.com/ecosystem-dashboard/)for software package version recommendations on Arm Neoverse Linux machines.
62
61
{{% /notice %}}
63
62
64
-
Java installation is complete. You can now proceed with the baseline testing.
63
+
Your Java environment has been successfully configured. You may now proceed with baseline testing.
0 commit comments