Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable optimized Netty direct bytebuffer reflection access #412

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
2 changes: 1 addition & 1 deletion bin/benchmark
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ fi
JVM_MEM="${HEAP_OPTS} -XX:+UseG1GC"
JVM_GC_LOG=" -XX:+PrintGCDetails -XX:+PrintGCApplicationStoppedTime -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=64m -Xloggc:/dev/shm/benchmark-client-gc_%p.log"

java -server -cp $CLASSPATH $JVM_MEM io.openmessaging.benchmark.Benchmark $*
java -server -cp $CLASSPATH $JVM_MEM io.openmessaging.benchmark.Benchmark "$@"
11 changes: 9 additions & 2 deletions bin/benchmark-worker
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,12 @@ fi

JVM_MEM="${HEAP_OPTS} -XX:+UseG1GC"
JVM_GC_LOG=" -XX:+PrintGCDetails -XX:+PrintGCApplicationStoppedTime -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=64m -Xloggc:/dev/shm/benchmark-client-gc_%p.log"

exec java -server -cp $CLASSPATH $JVM_MEM io.openmessaging.benchmark.worker.BenchmarkWorker $*
# Required by Netty for optimized direct byte buffer access
JVM_OPTS="$JVM_OPTS -Dio.netty.tryReflectionSetAccessible=true"
JVM_OPTS="$JVM_OPTS --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED"
# Set io.netty.tryReflectionSetAccessible in Pulsar's shaded client
JVM_OPTS="$JVM_OPTS -Dorg.apache.pulsar.shade.io.netty.tryReflectionSetAccessible=true"
# Required by Pulsar client optimized checksum calculation on other than Linux x86_64 platforms
# reflection access to java.util.zip.CRC32C
JVM_OPTS="$JVM_OPTS --add-opens java.base/java.util.zip=ALL-UNNAMED"
exec java -server -cp $CLASSPATH $JVM_MEM $JVM_OPTS io.openmessaging.benchmark.worker.BenchmarkWorker "$@"
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,13 @@
<version>${maven.surefire.plugin.version}</version>
<configuration>
<!-- Required by system-lambda test dependency -->
<argLine>--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED</argLine>
<!-- Required by Netty for optimized direct byte buffer access -->
<!-- Required by Pulsar client for optimized direct byte buffer access and optimized checksum calculation -->
<argLine>--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED
-Dio.netty.tryReflectionSetAccessible=true
--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED
-Dorg.apache.pulsar.shade.io.netty.tryReflectionSetAccessible=true
--add-opens java.base/java.util.zip=ALL-UNNAMED</argLine>
</configuration>
</plugin>
<plugin>
Expand Down
Loading