@@ -112,8 +112,7 @@ fn recommended_trino_jvm_args(product_version: u16) -> Result<Vec<String>, Error
112112 match product_version {
113113 // Copied from:
114114 // - https://trino.io/docs/477/installation/deployment.html#jvm-config
115- // - https://trino.io/docs/479/installation/deployment.html#jvm-config
116- 477 | 479 => Ok ( vec ! [
115+ 477 => Ok ( vec ! [
117116 "-XX:InitialRAMPercentage=80" . to_owned( ) ,
118117 "-XX:MaxRAMPercentage=80" . to_owned( ) ,
119118 "-XX:G1HeapRegionSize=32M" . to_owned( ) ,
@@ -129,6 +128,44 @@ fn recommended_trino_jvm_args(product_version: u16) -> Result<Vec<String>, Error
129128 "-Dfile.encoding=UTF-8" . to_owned( ) ,
130129 "-XX:+EnableDynamicAgentLoading" . to_owned( ) ,
131130 ] ) ,
131+ // Copied from:
132+ // - https://trino.io/docs/479/installation/deployment.html#jvm-config.
133+ // However, the docs are wrong: https://github.com/trinodb/trino/commit/1ddb0f9976fcd9917aaf0b689ca0acc8635e24f1.
134+ // According to the commit we need to add "--add-modules=jdk.incubator.vector"
135+ 479 => Ok ( vec ! [
136+ "-XX:InitialRAMPercentage=80" . to_owned( ) ,
137+ "-XX:MaxRAMPercentage=80" . to_owned( ) ,
138+ "-XX:G1HeapRegionSize=32M" . to_owned( ) ,
139+ "-XX:+ExplicitGCInvokesConcurrent" . to_owned( ) ,
140+ "-XX:+ExitOnOutOfMemoryError" . to_owned( ) ,
141+ "-XX:+HeapDumpOnOutOfMemoryError" . to_owned( ) ,
142+ "-XX:-OmitStackTraceInFastThrow" . to_owned( ) ,
143+ "-XX:ReservedCodeCacheSize=512M" . to_owned( ) ,
144+ "-XX:PerMethodRecompilationCutoff=10000" . to_owned( ) ,
145+ "-XX:PerBytecodeRecompilationCutoff=10000" . to_owned( ) ,
146+ "-Djdk.attach.allowAttachSelf=true" . to_owned( ) ,
147+ "-Djdk.nio.maxCachedBufferSize=2000000" . to_owned( ) ,
148+ "-Dfile.encoding=UTF-8" . to_owned( ) ,
149+ "-XX:+EnableDynamicAgentLoading" . to_owned( ) ,
150+ "--add-modules=jdk.incubator.vector" . to_owned( ) ,
151+ ] ) ,
152+ // Copied from:
153+ // - https://trino.io/docs/481/installation/deployment.html#jvm-config
154+ 481 => Ok ( vec ! [
155+ "-XX:InitialRAMPercentage=80" . to_owned( ) ,
156+ "-XX:MaxRAMPercentage=80" . to_owned( ) ,
157+ "-XX:G1HeapRegionSize=32M" . to_owned( ) ,
158+ "-XX:+ExplicitGCInvokesConcurrent" . to_owned( ) ,
159+ "-XX:+ExitOnOutOfMemoryError" . to_owned( ) ,
160+ "-XX:+HeapDumpOnOutOfMemoryError" . to_owned( ) ,
161+ "-XX:-OmitStackTraceInFastThrow" . to_owned( ) ,
162+ "-XX:ReservedCodeCacheSize=512M" . to_owned( ) ,
163+ "-XX:PerMethodRecompilationCutoff=10000" . to_owned( ) ,
164+ "-XX:PerBytecodeRecompilationCutoff=10000" . to_owned( ) ,
165+ "-Djdk.attach.allowAttachSelf=true" . to_owned( ) ,
166+ "-Djdk.nio.maxCachedBufferSize=2000000" . to_owned( ) ,
167+ "--add-modules=jdk.incubator.vector" . to_owned( ) ,
168+ ] ) ,
132169 _ => TrinoVersionNotSupportedSnafu {
133170 version : product_version,
134171 }
0 commit comments