Skip to content

Commit 27fe7df

Browse files
committed
Add JIT compiler directives to workaround performance regression in memory segment access in JDK 23 (elastic#113817)
This commit adds a couple of JIT compiler directives to avoid a performance pitfall in JDK 23. Ultimately this is a workaround for a JDK 23 bug, which has been reported and will be fixed in a future version of the JDK. The nested rally track uncovered the JDK performance regression. Running JDK 23 with the compiler directives in this PR restores performance, and in fact improves it in several cases.
1 parent a5c05af commit 27fe7df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

distribution/src/config/jvm.options

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@
5858
# result in less optimal vector performance
5959
20-:--add-modules=jdk.incubator.vector
6060

61+
# Required to workaround performance issue in JDK 23, https://github.com/elastic/elasticsearch/issues/113030
62+
23:-XX:CompileCommand=dontinline,java/lang/invoke/MethodHandle.setAsTypeCache
63+
23:-XX:CompileCommand=dontinline,java/lang/invoke/MethodHandle.asTypeUncached
64+
6165
## heap dumps
6266

6367
# generate a heap dump when an allocation from the Java heap fails; heap dumps

0 commit comments

Comments
 (0)