Skip to content

Commit f8bc9ec

Browse files
author
Luqman Saeed
committed
Final workshop prep: ZGC+G1 dual setup, all docs updated
1 parent 5bb3601 commit f8bc9ec

46 files changed

Lines changed: 918 additions & 436 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# TradeStreamEE Environment Variables
22

33
# Payara Micro Version (used by all Dockerfiles)
4-
PAYARA_VERSION=7.2026.3
4+
PAYARA_VERSION=7.2026.5
55

66
# JVM Options for Azul Platform Prime
77
# Adjust these for your performance requirements

.profileconfig.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"jfrConfig": {
3+
"settings": "profile"
4+
},
5+
"asyncProfilerConfig": {
6+
"jfrsync": true,
7+
"alloc": true,
8+
"event": "wall",
9+
"misc": ""
10+
},
11+
"file": "$PROJECT_DIR/profile.jfr",
12+
"conversionConfig": {
13+
"nonProjectPackagePrefixes": [
14+
"java.",
15+
"javax.",
16+
"kotlin.",
17+
"jdk.",
18+
"com.google.",
19+
"org.apache.",
20+
"org.spring.",
21+
"sun.",
22+
"scala."
23+
],
24+
"enableMarkers": true,
25+
"initialVisibleThreads": 10,
26+
"initialSelectedThreads": 10,
27+
"includeGCThreads": false,
28+
"includeInitialSystemProperty": false,
29+
"includeInitialEnvironmentVariables": false,
30+
"includeSystemProcesses": false,
31+
"ignoredEvents": [
32+
"jdk.ActiveSetting",
33+
"jdk.ActiveRecording",
34+
"jdk.BooleanFlag",
35+
"jdk.IntFlag",
36+
"jdk.DoubleFlag",
37+
"jdk.LongFlag",
38+
"jdk.NativeLibrary",
39+
"jdk.StringFlag",
40+
"jdk.UnsignedIntFlag",
41+
"jdk.UnsignedLongFlag",
42+
"jdk.InitialSystemProperty",
43+
"jdk.InitialEnvironmentVariable",
44+
"jdk.SystemProcess",
45+
"jdk.ModuleExport",
46+
"jdk.ModuleRequire"
47+
],
48+
"minRequiredItemsPerThread": 3
49+
},
50+
"additionalGradleTargets": [
51+
{
52+
"targetPrefix": "quarkus",
53+
"optionForVmArgs": "-Djvm.args",
54+
"description": "Example quarkus config, adding profiling arguments via -Djvm.args option to the Gradle task run"
55+
}
56+
],
57+
"additionalMavenTargets": [
58+
{
59+
"targetPrefix": "quarkus:",
60+
"optionForVmArgs": "-Djvm.args",
61+
"description": "Example quarkus config, adding profiling arguments via -Djvm.args option to the Maven goal run"
62+
}
63+
]
64+
}

Dockerfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Multi-stage Dockerfile for TradeStreamEE
2-
# Uses Azul Platform Prime (Zing) for Pauseless Garbage Collection demonstration
2+
# Uses Azul Zulu 25 with ZGC for low-latency concurrent garbage collection
33

4-
FROM azul/zulu-openjdk:21 AS build
4+
FROM azul/zulu-openjdk:25-latest AS build
55
WORKDIR /app
66

77
# Copy Maven wrapper and pom.xml first for better layer caching
@@ -18,16 +18,16 @@ COPY src ./src
1818
RUN ./mvnw spotless:apply
1919
RUN ./mvnw clean package -DskipTests
2020

21-
# Use Azul Platform Prime for C4 GC
22-
FROM azul/prime:21
21+
# Azul Zulu 25 with ZGC for concurrent garbage collection
22+
FROM azul/zulu-openjdk:25-latest
2323

2424
LABEL maintainer="TradeStreamEE"
25-
LABEL description="High-frequency trading dashboard with Aeron + SBE + Payara Micro + Azul C4"
25+
LABEL description="High-frequency trading dashboard with Aeron + SBE + Payara Micro + Zulu 25 ZGC"
2626

2727
WORKDIR /opt/payara
2828

2929
# Add Payara Micro from URL
30-
ARG PAYARA_VERSION=7.2026.3
30+
ARG PAYARA_VERSION=7.2026.5
3131
ADD https://nexus.payara.fish/repository/payara-community/fish/payara/extras/payara-micro/${PAYARA_VERSION}/payara-micro-${PAYARA_VERSION}.jar /opt/payara/payara-micro.jar
3232

3333
# Copy WAR file from build stage
@@ -43,26 +43,25 @@ RUN mkdir -p /opt/payara/recordings /opt/payara/gc-logs && chmod 777 /opt/payara
4343
EXPOSE 8080
4444
EXPOSE 9009
4545

46-
# Default JVM Options for Azul Platform Prime
46+
# Default JVM Options for Azul Zulu 25 + ZGC
4747
#
4848
# NOTE: These JAVA_OPTS are used for single-instance deployments (start.sh script).
4949
# For cluster deployments (start-comparison.sh), these values are overridden by
5050
# docker-compose-{c4,g1}.yml environment variables. See those files for actual
5151
# runtime flags in cluster mode.
5252
#
53-
# Azul Platform Prime uses C4 GC by default - no need to specify -XX:+UseZGC
53+
# ZGC is a concurrent collector with sub-millisecond pauses on Java 25.
5454
#
5555
# JFR is OFF by default. Ad-hoc recordings are produced via the /api/jfr REST
5656
# endpoints. To enable an always-on circular recording, set JFR_ALWAYS_ON=true
5757
# in the environment; see docker-entrypoint.sh.
5858
ENV JAVA_OPTS="-Xms8g \
5959
-Xmx8g \
60+
-XX:+UseZGC \
6061
-Xlog:gc*:file=/opt/payara/gc-logs/gc.log:time,uptime,level,tags:filecount=5,filesize=10M \
6162
--add-opens java.base/jdk.internal.misc=ALL-UNNAMED \
6263
--add-opens java.base/sun.nio.ch=ALL-UNNAMED \
6364
--add-opens java.base/java.nio=ALL-UNNAMED \
64-
-XX:+UnlockDiagnosticVMOptions \
65-
-XX:+UnlockExperimentalVMOptions \
6665
-XX:+AlwaysPreTouch \
6766
-XX:+UseTransparentHugePages \
6867
-XX:+UseStringDeduplication \

Dockerfile.scale

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Multi-stage Dockerfile for TradeStreamEE with Hazelcast Clustering
2-
# Uses Azul Platform Prime (Zing) for Pauseless Garbage Collection demonstration
2+
# Uses Azul Zulu 25 with ZGC for low-latency concurrent garbage collection
33

4-
FROM azul/zulu-openjdk:21 AS build
4+
FROM azul/zulu-openjdk:25-latest AS build
55
WORKDIR /app
66

77
# Copy Maven wrapper and pom.xml first for better layer caching
@@ -18,16 +18,16 @@ COPY src ./src
1818
RUN ./mvnw spotless:apply
1919
RUN ./mvnw clean package -DskipTests
2020

21-
# Use Azul Platform Prime for C4 GC
22-
FROM azul/prime:21
21+
# Azul Zulu 25 with ZGC for concurrent garbage collection
22+
FROM azul/zulu-openjdk:25-latest
2323

2424
LABEL maintainer="TradeStreamEE"
25-
LABEL description="High-frequency trading dashboard with Aeron + SBE + Payara Micro + Azul C4 + Hazelcast Clustering"
25+
LABEL description="High-frequency trading dashboard with Aeron + SBE + Payara Micro + Zulu 25 ZGC + Hazelcast Clustering"
2626

2727
WORKDIR /opt/payara
2828

2929
# Add Payara Micro from URL
30-
ARG PAYARA_VERSION=7.2026.3
30+
ARG PAYARA_VERSION=7.2026.5
3131
ADD https://nexus.payara.fish/repository/payara-community/fish/payara/extras/payara-micro/${PAYARA_VERSION}/payara-micro-${PAYARA_VERSION}.jar /opt/payara/payara-micro.jar
3232

3333
# Copy WAR file from build stage
@@ -39,29 +39,27 @@ RUN mkdir -p /opt/payara/recordings /opt/payara/gc-logs && chmod 777 /opt/payara
3939
EXPOSE 8080
4040
EXPOSE 5701
4141

42-
# Default JVM Options for Azul Platform Prime
42+
# Default JVM Options for Azul Zulu 25 + ZGC
4343
#
4444
# NOTE: These JAVA_OPTS are defaults for the cluster image. However, when launched
4545
# via docker-compose-c4.yml, these values are overridden by environment variables
4646
# in that file. See docker-compose-c4.yml for actual runtime flags in cluster mode.
4747
#
4848
# Reduced heap size (4GB vs 8GB) for multi-instance deployments.
49-
# Azul Platform Prime uses C4 GC by default - no need to specify -XX:+UseZGC
49+
# ZGC is a concurrent collector with sub-millisecond pauses on Java 25.
5050
#
5151
# JFR is OFF by default. Workshop scenarios use ad-hoc recordings via the REST API
5252
# (POST /api/jfr/recording/start). To enable a long-running always-on circular
5353
# recording, set JFR_ALWAYS_ON=true in the environment.
5454
ENV JAVA_OPTS="-Xms4g \
5555
-Xmx4g \
56+
-XX:+UseZGC \
5657
-Xlog:gc*:file=/opt/payara/gc-logs/gc.log:time,uptime,level,tags:filecount=5,filesize=10M \
5758
--add-opens java.base/jdk.internal.misc=ALL-UNNAMED \
5859
--add-opens java.base/sun.nio.ch=ALL-UNNAMED \
5960
--add-opens java.base/java.nio=ALL-UNNAMED \
60-
-XX:+UnlockDiagnosticVMOptions \
61-
-XX:+UnlockExperimentalVMOptions \
6261
-XX:+AlwaysPreTouch \
6362
-XX:+UseTransparentHugePages \
64-
-XX:-UseBiasedLocking \
6563
-XX:+UseStringDeduplication \
6664
-XX:+OptimizeStringConcat \
6765
-Djava.net.preferIPv4Stack=true \
@@ -74,7 +72,7 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
7472
# Copy Hazelcast configuration
7573
COPY src/main/resources/hazelcast-config.xml /opt/payara/hazelcast-config.xml
7674

77-
# Set unique cluster name for C4 environment and update discovery members
75+
# Set unique cluster name for ZGC environment and update discovery members
7876
RUN sed -i 's/payara-trader-cluster/payara-trader-c4/' /opt/payara/hazelcast-config.xml && \
7977
sed -i 's/trader-stream-/trader-stream-c4-/' /opt/payara/hazelcast-config.xml
8078

Dockerfile.scale.standard

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Multi-stage Dockerfile for TradeStreamEE with Hazelcast Clustering
2-
# Uses Eclipse Temurin (Standard OpenJDK) for comparison against Azul Platform Prime
2+
# Uses Eclipse Temurin 25 (Standard OpenJDK) for comparison against Azul Zulu ZGC
33

4-
FROM azul/zulu-openjdk:21 AS build
4+
FROM eclipse-temurin:25 AS build
55
WORKDIR /app
66

77
# Copy Maven wrapper and pom.xml first for better layer caching
@@ -18,16 +18,16 @@ COPY src ./src
1818
RUN ./mvnw spotless:apply
1919
RUN ./mvnw clean package -DskipTests
2020

21-
# Use Eclipse Temurin (Standard OpenJDK)
22-
FROM eclipse-temurin:21
21+
# Eclipse Temurin 25 with G1GC for comparison against ZGC
22+
FROM eclipse-temurin:25
2323

2424
LABEL maintainer="TradeStreamEE"
2525
LABEL description="High-frequency trading dashboard with Hazelcast Clustering (Standard JVM Comparison)"
2626

2727
WORKDIR /opt/payara
2828

2929
# Add Payara Micro from URL
30-
ARG PAYARA_VERSION=7.2026.3
30+
ARG PAYARA_VERSION=7.2026.5
3131
ADD https://nexus.payara.fish/repository/payara-community/fish/payara/extras/payara-micro/${PAYARA_VERSION}/payara-micro-${PAYARA_VERSION}.jar /opt/payara/payara-micro.jar
3232

3333
# Copy WAR file from build stage

Dockerfile.standard

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Multi-stage Dockerfile for TradeStreamEE
2-
# Uses Eclipse Temurin (Standard OpenJDK) for comparison against Azul Platform Prime
2+
# Uses Eclipse Temurin 25 (Standard OpenJDK) for comparison against Azul Zulu ZGC
33

4-
FROM azul/zulu-openjdk:21 AS build
4+
FROM eclipse-temurin:25 AS build
55
WORKDIR /app
66

77
# Copy Maven wrapper and pom.xml first for better layer caching
@@ -18,16 +18,16 @@ COPY src ./src
1818
RUN ./mvnw spotless:apply
1919
RUN ./mvnw clean package -DskipTests
2020

21-
# Use Eclipse Temurin (Standard OpenJDK)
22-
FROM eclipse-temurin:21
21+
# Eclipse Temurin 25 with G1GC for comparison against ZGC
22+
FROM eclipse-temurin:25
2323

2424
LABEL maintainer="TradeStreamEE"
2525
LABEL description="High-frequency trading dashboard (Standard JVM Comparison)"
2626

2727
WORKDIR /opt/payara
2828

2929
# Add Payara Micro from URL
30-
ARG PAYARA_VERSION=7.2026.3
30+
ARG PAYARA_VERSION=7.2026.5
3131
ADD https://nexus.payara.fish/repository/payara-community/fish/payara/extras/payara-micro/${PAYARA_VERSION}/payara-micro-${PAYARA_VERSION}.jar /opt/payara/payara-micro.jar
3232

3333
# Copy WAR file from build stage

0 commit comments

Comments
 (0)