Skip to content

Add -XX:+UnlockDiagnosticVMOptions and -XX:+UseAESCTRIntrinsics#47

Merged
hashhar merged 2 commits intotrinodb:mainfrom
radek-kondziolka:rk/add_jvm_options_to_enable_AESCTRIntrinsics
May 13, 2022
Merged

Add -XX:+UnlockDiagnosticVMOptions and -XX:+UseAESCTRIntrinsics#47
hashhar merged 2 commits intotrinodb:mainfrom
radek-kondziolka:rk/add_jvm_options_to_enable_AESCTRIntrinsics

Conversation

@radek-kondziolka
Copy link
Copy Markdown
Contributor

This PR enables JVM options -XX:+UnlockDiagnosticVMOptions and -XX:+UseAESCTRIntrinsics to 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:+UnlockDiagnosticVMOptions and -XX:+UseAESCTRIntrinsics. It was not enabled by default in the backport to OpenJDK11 because of conservative approach (as they point in the PR).

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.
@cla-bot cla-bot bot added the cla-signed label May 11, 2022
@radek-kondziolka radek-kondziolka marked this pull request as draft May 11, 2022 06:58
@radek-kondziolka radek-kondziolka marked this pull request as ready for review May 11, 2022 06:59
@hashhar
Copy link
Copy Markdown
Member

hashhar commented May 11, 2022

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.

@radek-kondziolka
Copy link
Copy Markdown
Contributor Author

Has this already been merged to Trino itself?

No, there is a pull request to the Trino (waiting to be merged). Please do not merge this one until I confirm that fact.
I changed this PR to be a draft.

@radek-kondziolka radek-kondziolka marked this pull request as draft May 11, 2022 07:39
@radek-kondziolka radek-kondziolka marked this pull request as ready for review May 12, 2022 14:02
@hashhar
Copy link
Copy Markdown
Member

hashhar commented May 13, 2022

Merging since the corresponding Trino PR has been merged as trinodb/trino#12251

@hashhar hashhar merged commit 8187bca into trinodb:main May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants