You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elasticsearch uses few math formulas for basic JVM ergonomics when launching without explicit heap size settings. We look at the max available heap and the max direct memory on the system, and then we use them to determine what's a good heap size for the JVM.
Running the following command below produces this output with j9:
According to the Java SE docs, it should be 0 if it's not specified:
Sets the maximum total size (in bytes) of the New I/O (the java.nio package) direct-buffer allocations. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct-buffer allocations automatically. https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html (search for XX:MaxDirectMemorySize)
j9 version:
java version "17.0.6-ea" 2023-01-17
IBM Semeru Runtime Open Edition 17.0.6.0-december_22-preview_1 (build 17.0.6-ea+6)
Eclipse OpenJ9 VM 17.0.6.0-december_22-preview_1 (build criu-preview-december_22-release-6c898853679, JRE 17 Linux amd64-64-Bit Compressed References 20230117_95 (JIT enabled, AOT enabled)
OpenJ9 - 6c898853679
OMR - 6124dbc41
JCL - 220b5cb074a based on jdk-17.0.6+6)
I took a look at the code that prints the Hotspot compatible flags output, so I it can easily be tweaked for the printout so Java programs can find this setting. Strangely enough, the Hotspot JCL treats -1 as unset (or empty setting), but prints 0.
Elasticsearch uses few math formulas for basic JVM ergonomics when launching without explicit heap size settings. We look at the max available heap and the max direct memory on the system, and then we use them to determine what's a good heap size for the JVM.
Running the following command below produces this output with j9:
Running Hotspot with the same produces:
According to the Java SE docs, it should be 0 if it's not specified:
Sets the maximum total size (in bytes) of the New I/O (the java.nio package) direct-buffer allocations. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct-buffer allocations automatically.
https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html (search for
XX:MaxDirectMemorySize
)j9 version:
java version "17.0.6-ea" 2023-01-17 IBM Semeru Runtime Open Edition 17.0.6.0-december_22-preview_1 (build 17.0.6-ea+6) Eclipse OpenJ9 VM 17.0.6.0-december_22-preview_1 (build criu-preview-december_22-release-6c898853679, JRE 17 Linux amd64-64-Bit Compressed References 20230117_95 (JIT enabled, AOT enabled) OpenJ9 - 6c898853679 OMR - 6124dbc41 JCL - 220b5cb074a based on jdk-17.0.6+6)
OS/System information:
The text was updated successfully, but these errors were encountered: