Add -XX:+UnlockDiagnosticVMOptions and -XX:+UseAESCTRIntrinsics#47
Merged
hashhar merged 2 commits intotrinodb:mainfrom May 13, 2022
Merged
Conversation
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.
Member
|
Has this already been merged to Trino itself? Also you will want to bump the chart version as in b50de31 so that the new version is released once this is merged. |
Contributor
Author
No, there is a pull request to the Trino (waiting to be merged). Please do not merge this one until I confirm that fact. |
Member
|
Merging since the corresponding Trino PR has been merged as trinodb/trino#12251 |
hashhar
approved these changes
May 13, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables JVM options
-XX:+UnlockDiagnosticVMOptionsand-XX:+UseAESCTRIntrinsicsto enable intrinsic support for AES CTR/GCM on ARM64. This is motivated by the SSL communication overhead observed with S3.We observed that 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.
Some words of explanation
In latest Java (OpenJDK) versions the performance of AES CTR/GCM for AARCH64 was significally improved and it was backported to OpenJDK 11 (openjdk/jdk11u-dev#410). The original OpenJDK issue can be found here: https://bugs.openjdk.java.net/browse/JDK-8267993. To use that backport we need to enable it explicitly by
enabling
-XX:+UnlockDiagnosticVMOptionsand-XX:+UseAESCTRIntrinsics. It was not enabled by default in the backport toOpenJDK11because of conservative approach (as they point in the PR).