Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 90 additions & 14 deletions frameworks/Java/vertx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,6 @@
<artifactId>jsonsergen</artifactId>
<version>0.0.5</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>${netty.version}</version>
<classifier>osx-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>${netty.version}</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
Expand Down Expand Up @@ -149,9 +137,30 @@

<profiles>
<profile>
<id>Linux</id>
<id>linux-x86_64</id>
<activation>
<os>
<family>linux</family>
<arch>x86_64</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-io_uring</artifactId>
<version>${netty.version}</version>
<classifier>linux-x86_64</classifier>
</dependency>
</dependencies>
</profile>

<profile>
<id>linux-amd64</id>
<activation>
<activeByDefault>false</activeByDefault>
<os>
<family>linux</family>
<arch>amd64</arch>
</os>
</activation>
<dependencies>
<dependency>
Expand All @@ -162,6 +171,73 @@
</dependency>
</dependencies>
</profile>

<profile>
<id>linux-aarch64</id>
<activation>
<os>
<family>linux</family>
<arch>aarch64</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-io_uring</artifactId>
<version>${netty.version}</version>
<classifier>linux-aarch_64</classifier>
</dependency>
</dependencies>
</profile>

<profile>
<id>osx-x86_64</id>
<activation>
<os>
<family>mac</family>
<arch>x86_64</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>${netty.version}</version>
<classifier>osx-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>${netty.version}</version>
<classifier>osx-x86_64</classifier>
</dependency>
</dependencies>
</profile>

<profile>
<id>osx-aarch64</id>
<activation>
<os>
<family>mac</family>
<arch>aarch64</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>${netty.version}</version>
<classifier>osx-aarch_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>${netty.version}</version>
<classifier>osx-aarch_64</classifier>
</dependency>
</dependencies>
</profile>

</profiles>

</project>
2 changes: 1 addition & 1 deletion frameworks/Java/vertx/src/main/java/vertx/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void start(Promise<Void> startPromise) throws Exception {
options.setPassword(config.getString("password", "benchmarkdbpass"));
options.setCachePreparedStatements(true);
options.setPreparedStatementCacheMaxSize(1024);
options.setPipeliningLimit(100_000); // Large pipelining means less flushing and we use a single connection anyway
options.setPipeliningLimit(256); // Large pipelining means less flushing and we use a single connection anyway
Future<?> clientsInit = initClients(options);
clientsInit
.transform(ar -> {
Expand Down
8 changes: 6 additions & 2 deletions frameworks/Java/vertx/vertx-postgres.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM maven:3.9.0-eclipse-temurin-17 as maven
FROM maven:3.9.9-eclipse-temurin-24-noble as maven
WORKDIR /vertx
COPY src src
COPY pom.xml pom.xml
Expand All @@ -9,6 +9,9 @@ EXPOSE 8080
CMD export DBIP=`getent hosts tfb-database | awk '{ print $1 }'` && \
sed -i "s|tfb-database|$DBIP|g" /vertx/src/main/conf/config.json && \
java \
--enable-native-access=ALL-UNNAMED \
--sun-misc-unsafe-memory-access=allow \
--add-opens=java.base/java.lang=ALL-UNNAMED \
-Xms2G \
-Xmx2G \
-server \
Expand All @@ -22,7 +25,8 @@ CMD export DBIP=`getent hosts tfb-database | awk '{ print $1 }'` && \
-Dvertx.cacheImmutableHttpResponseHeaders=true \
-Dvertx.internCommonHttpRequestHeadersToLowerCase=true \
-Dvertx.eventLoopPoolSize=$((`grep --count ^processor /proc/cpuinfo`)) \
-Dio.netty.buffer.checkBounds=false \
-Dio.netty.noUnsafe=false \
-Dio.netty.buffer.checkBounds=false \
-Dio.netty.buffer.checkAccessible=false \
-jar \
target/vertx.benchmark-0.0.1-SNAPSHOT-fat.jar \
Expand Down
4 changes: 2 additions & 2 deletions frameworks/Java/vertx/vertx.dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM maven:3.9.0-eclipse-temurin-17 as maven
FROM maven:3.9.9-eclipse-temurin-24-noble as maven
WORKDIR /vertx
COPY src src
COPY pom.xml pom.xml
RUN mvn package -q

EXPOSE 8080

CMD ["java", "-Xms2G", "-Xmx2G", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-Djava.lang.Integer.IntegerCache.high=10000", "-Dvertx.disableMetrics=true", "-Dvertx.disableWebsockets=true", "-Dvertx.disableContextTimings=true", "-Dvertx.disableHttpHeadersValidation=true", "-Dvertx.cacheImmutableHttpResponseHeaders=true", "-Dvertx.internCommonHttpRequestHeadersToLowerCase=true", "-Dio.netty.buffer.checkBounds=false", "-Dio.netty.buffer.checkAccessible=false", "-jar", "target/vertx.benchmark-0.0.1-SNAPSHOT-fat.jar", "src/main/conf/config.json"]
CMD ["java", "--enable-native-access=ALL-UNNAMED", "--sun-misc-unsafe-memory-access=allow", "--add-opens=java.base/java.lang=ALL-UNNAMED", "-Xms2G", "-Xmx2G", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-Djava.lang.Integer.IntegerCache.high=10000", "-Dvertx.disableMetrics=true", "-Dvertx.disableWebsockets=true", "-Dvertx.disableContextTimings=true", "-Dvertx.disableHttpHeadersValidation=true", "-Dvertx.cacheImmutableHttpResponseHeaders=true", "-Dvertx.internCommonHttpRequestHeadersToLowerCase=true", "-Dio.netty.noUnsafe=false", "-Dio.netty.buffer.checkBounds=false", "-Dio.netty.buffer.checkAccessible=false", "-jar", "target/vertx.benchmark-0.0.1-SNAPSHOT-fat.jar", "src/main/conf/config.json"]
Loading