Skip to content

Commit

Permalink
Add -XX:+UnlockDiagnosticVMOptions and -XX:+UseAESCTRIntrinsics
Browse files Browse the repository at this point in the history
This PR adds options -XX:+UnlockDiagnosticVMOptions and
-XX:+UseAESCTRIntrinsics to the JVM's options to enable
intrinsic support for AES CTR/GCM on ARM64.

It improves performance of network communication with S3
a lot on graviton instances. It's enabled in Java 18 by default,
which is already released. Therefore risk is minimal.

In latest Java (OpenJDK) versions the performance of AES CTR/GCM
for AARCH64 was significally improved and it was backported to OpenJDK 11.
Backport PR: openjdk/jdk11u-dev#410.
Some additional explanation is here:
aws/aws-graviton-getting-started#110 (comment)
The original OpenJDK issue is here:
https://bugs.openjdk.java.net/browse/JDK-8267993
To use that backport we need to enable it explicitly by
enabling -XX:+UnlockDiagnosticVMOptions and -XX:+UseAESCTRIntrinsics.
It was not enabled by default in the backport because of
conservative approach.
  • Loading branch information
rkondziolka authored and hashhar committed May 13, 2022
1 parent 2438f79 commit 4dbb2c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/trino/templates/configmap-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ data:
-XX:PerMethodRecompilationCutoff=10000
-XX:PerBytecodeRecompilationCutoff=10000
-Djdk.nio.maxCachedBufferSize=2000000
-XX:+UnlockDiagnosticVMOptions
-XX:+UseAESCTRIntrinsics
{{- range $configValue := .Values.coordinator.additionalJVMConfig }}
{{ $configValue }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions charts/trino/templates/configmap-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ data:
-XX:PerMethodRecompilationCutoff=10000
-XX:PerBytecodeRecompilationCutoff=10000
-Djdk.nio.maxCachedBufferSize=2000000
-XX:+UnlockDiagnosticVMOptions
-XX:+UseAESCTRIntrinsics
{{- range $configValue := .Values.worker.additionalJVMConfig }}
{{ $configValue }}
{{- end }}
Expand Down

0 comments on commit 4dbb2c1

Please sign in to comment.