Dremio version 25 and later no longer support Java 8. Java 11 is required.
To troubleshoot garbage collection and heap issues, customers have previously been asked to set a number of JVM switches to capture extra logging, for example:
-Xloggc:/opt/dremio/data/log/gc.log
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=1
-XX:GCLogFileSize=4000k
-XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
-XX:+PrintGCDateStamps
-XX:+PrintClassHistogramBeforeFullGC
-XX:+PrintClassHistogramAfterFullGC
These options are no longer allowed in Java 11 and will cause Dremio to fail to start up, with an error similar to :
Unrecognized VM option 'UseGCLogFileRotation'
New options for Java 11
Java 11 uses "JVM unified logging" with a new set of parameters.
The equivalent JVM switches for the above gc log settings would be :
-Xlog:gc*,classhisto*=trace:file=/opt/dremio/data/log/gc.log:uptime,time,tags,level:filecount=1,filesize=4M
Breaking that down:
New parameter | Old equivalent | Description |
-Xlog: | Use the Xlog framework | |
gc* | -Xloggc: | Log messages tagged with at least 'gc' up to 'info' level |
classhisto*=trace |
-XX:+PrintClassHistogramBeforeFullGC -XX:+PrintClassHistogramAfterFullGC |
Print a class histogram before and after any major stop-world GC |
file=<filename> | -Xloggc:<filename> | Filename to use as the gc log file.
|
uptime | Include the time since the JVM started in all log messages | |
time |
-XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps |
Include the time in all log messages |
tags |
Include all tags relevant to each message - e.g. [gc,cpu ] |
|
level | Include the logging level of each message | |
filecount=1 | -XX:NumberOfGCLogFiles=1 | Number of files to keep in rotation (not counting the active file) |
filesize=4M | -XX:GCLogFileSize=4000k | Max size of each log file |
Adding timestamp to the file name
One can add %t to the file parameter which uses the JVM startup date and time in the filename, this can be desirable but, this will change the meaning of filecount so that
-Xlog:gc*,classhisto*=trace:file=gc-%t.log
will result in files with the following names assuming filecount=1 as you will note this means the limit of 1 is not achieved for all files
gc-2024-06-14_16-50-07.log
gc-2024-06-14_16-50-07.log.0
gc-2024-06-13_12-40-07.log
gc-2024-06-13_12-4--00.log.0