Skip to content

Commit cfdedec

Browse files
Tweaks
1 parent f1d6ad2 commit cfdedec

File tree

3 files changed

+35
-28
lines changed

3 files changed

+35
-28
lines changed

content/learning-paths/servers-and-cloud-computing/java-on-azure/background.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ weight: 2
66
layout: "learningpathall"
77
---
88

9-
## Azure Cobalt 100 Armbased processor
9+
## Azure Cobalt 100 Arm-based CPU for Linux workloads
1010

1111
Azure Cobalt 100 is Microsoft’s first‑generation, in‑house Arm‑based CPU built on Arm Neoverse N2. It is designed for predictable performance and energy efficiency across common Linux workloads such as web and application servers, analytics, open‑source databases, and caching systems. Each vCPU maps to a dedicated physical core and runs up to **3.4 GHz**, helping deliver consistent latency under load.
1212

1313
Learn more in this Microsoft announcement blog: [Announcing the preview of new Azure VMs based on the Azure Cobalt 100 processor](https://techcommunity.microsoft.com/blog/azurecompute/announcing-the-preview-of-new-azure-vms-based-on-the-azure-cobalt-100-processor/4146353).
1414

15-
## Java on Azure Cobalt 100
15+
## Running Java on Azure Cobalt 100 Arm-based VMs
1616

1717
Java is a mature, object‑oriented language and runtime used to build scalable, secure applications. The Java Virtual Machine (JVM) executes platform‑independent bytecode, enabling *write once, run anywhere* portability across architectures, including Arm64 (AArch64). On Azure Cobalt 100, Java services benefit from modern JIT compilers and efficient multithreading for steady throughput and low tail latency.
1818

content/learning-paths/servers-and-cloud-computing/java-on-azure/baseline.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ layout: learningpathall
77
---
88

99

10-
### Deploy a Java application with a Tomcat-like operation
10+
## Deploy a Java application with a Tomcat-like operation
1111
Apache Tomcat is a widely used Java web application server. Technically, it is a Servlet container, responsible for executing Java servlets and supporting technologies such as:
1212

1313
- JSP (JavaServer Pages): Java-based templates for dynamic web content
14-
- RESTful APIs: Lightweight endpoints for modern microservices
14+
- RESTful APIs: lightweight endpoints for modern microservices
1515

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.
16+
In production, frameworks like Tomcat introduce additional complexity (such as request parsing, thread management, and 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.
1717

1818
In this section, you will run a minimal Tomcat-like simulation. It won't launch a real server, but instead it will do the following:
1919
- Construct a basic HTTP response string in memory
@@ -40,21 +40,25 @@ public class HttpSingleRequestTest {
4040
}
4141
}
4242
```
43-
## Compile and Run the Java program
43+
## Compile and run the Java program
44+
45+
Compile the program and run it with modest heap sizes and the G1 garbage collector:
4446

4547
```console
4648
javac HttpSingleRequestTest.java
4749
java -Xms128m -Xmx256m -XX:+UseG1GC HttpSingleRequestTest
4850
```
4951

50-
## jvm flags explained
52+
## JVM flags explained
5153

5254
- **-Xms128m** - sets the initial heap size to 128 MB
5355
- **-Xmx256m** - sets the maximum heap size to 256 MB
5456
- **-XX:+UseG1GC** - enables the G1 garbage collector designed for low pause times
5557

5658
## Sample output
5759

60+
If the program runs successfully, you should see output similar to the following:
61+
5862
```output
5963
java -Xms128m -Xmx256m -XX:+UseG1GC HttpSingleRequestTest
6064
Response Generated:

content/learning-paths/servers-and-cloud-computing/java-on-azure/benchmarking.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

22
---
3-
title: Benchmark using JMH
3+
title: Benchmark using Java Microbenchmark Harness
44
weight: 6
55

66
### FIXED, DO NOT MODIFY
77
layout: learningpathall
88
---
9+
## Overview
910

1011
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.
1112

@@ -81,6 +82,8 @@ This mirrors the Tomcat-like simulation you created earlier but now runs under J
8182

8283
## Build the benchmark JAR
8384

85+
Build the project to produce the benchmark JAR:
86+
8487
```console
8588
mvn clean install -q
8689
```
@@ -99,7 +102,7 @@ The output from this command should look like:
99102

100103
After the build is complete, the JMH benchmark JAR will be located in the target directory.
101104

102-
Run the Benchmark:
105+
Run the benchmark:
103106

104107
```console
105108
java -jar target/benchmarks.jar
@@ -215,32 +218,32 @@ MyBenchmark.benchmarkHttpResponse thrpt 25 35659618.044 ± 686946.011 ops/s
215218

216219
## Benchmark metrics explained
217220

218-
- **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.
219-
- **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.
220-
- **Standard Deviation**: Indicates the amount of variation or dispersion from the average throughput. A smaller standard deviation means more consistent performance.
221-
- **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.
222-
- **Min Throughput**: The lowest observed throughput across all iterations, representing a worst-case scenario under the current test conditions.
223-
- **Max Throughput**: The highest observed throughput across all iterations, representing the best-case performance under the current test conditions.
221+
- **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.
222+
- **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.
223+
- **Standard deviation** - indicates the amount of variation or dispersion from the average throughput. A smaller standard deviation means more consistent performance.
224+
- **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.
225+
- **Min throughput** - the lowest observed throughput across all iterations, representing a worst-case scenario under the current test conditions.
226+
- **Max throughput** - the highest observed throughput across all iterations, representing the best-case performance under the current test conditions.
224227

225-
### Benchmark summary on Arm64
228+
## Benchmark summary on Arm64
226229

227230
Here is a summary of benchmark results collected on an Arm64 **D4ps_v6 Ubuntu Pro 24.04 LTS virtual machine**.
228231
| Metric | Value |
229232
|--------------------------------|---------------------------|
230-
| **Java Version** | OpenJDK 21.0.8 |
231-
| **Run Count** | 25 iterations |
232-
| **Average Throughput** | 35.66M ops/sec |
233-
| **Standard Deviation** | ±0.92M ops/sec |
234-
| **Confidence Interval (99.9%)**| [34.97M, 36.34M] ops/sec |
235-
| **Min Throughput** | 33.53M ops/sec |
236-
| **Max Throughput** | 36.99M ops/sec |
233+
| **Java version** | OpenJDK 21.0.8 |
234+
| **Run count** | 25 iterations |
235+
| **Average throughput** | 35.66M ops/sec |
236+
| **Standard deviation** | ±0.92M ops/sec |
237+
| **Confidence interval (99.9%)**| [34.97M, 36.34M] ops/sec |
238+
| **Min throughput** | 33.53M ops/sec |
239+
| **Max throughput** | 36.99M ops/sec |
237240

238241

239-
### Key insights from the results
242+
## Key insights from the results
240243

241-
- **Strong throughput performance** The benchmark sustained around 35.6 million operations per second, demonstrating efficient string construction and memory handling on the Arm64 JVM.
242-
- **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.
243-
- **High statistical confidence** The narrow 99.9% confidence interval ([34.97M, 36.34M]) indicates reliable, repeatable results.
244-
- **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.
244+
- **Strong throughput performance** - the benchmark sustained around 35.6 million operations per second, demonstrating efficient string construction and memory handling on the Arm64 JVM.
245+
- **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.
246+
- **High statistical confidence** - the narrow 99.9% confidence interval ([34.97M, 36.34M]) indicates reliable, repeatable results.
247+
- **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.
245248

246249
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.

0 commit comments

Comments
 (0)