native build JVM options

Skip to first unread message

Qbyte Consulting

Mar 30, 2021, 3:41:51 AMMar 30
to Kogito development mailing list
For the GraalVM native build I notice -JXmx4g is the default, so I try to increase this amount but not sure how? I believe this should speed up compilation?


After increasing the additional arg is added but the original is kept - how to override the 4g limit?

[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] /Library/Java/JavaVirtualMachines/graalvm-ce-java11- -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Dfile.encoding=UTF-8 -J-Xmx16G --initialize-at-build-time=\$BySpaceAndTime -H:+JNI -jar promotion-engine-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -J-Xmx4g -H:-AddAllCharsets -H:EnableURLProtocols=http --no-server -H:-UseServiceLoaderFeature -H:+StackTrace promotion-engine-runner

Tristan Radisson

Mar 30, 2021, 3:47:04 AMMar 30
to Kogito development mailing list,

Would you have an example to test this ?

Note that if you test from repository, some have the `quarkus.native.native-image-xmx` property directly set in 'src/main/resources/' file. Example:
And this may be the cause you cannot override it.


Tristan Radisson

Senior Software Quality Engineer

Business Automation Cloud

Red Hat France   

You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Qbyte Consulting

Mar 30, 2021, 4:00:30 AMMar 30
to Kogito development mailing list

Mar 30, 2021, 6:25:54 AMMar 30

just one suggestion for the future regarding Quarkus. The properties you set are Maven properties, which (up to some exceptions like quarkus.package.type) won't be recognized by Quarkus Maven Plugin.

The order and source of properties which are recognized by Quarkus during the build time or runtime is defined here:

Since the Xmx property is a property needed before running of the application, it would be difficult/clumsy to set it as a system property for Quarkus Maven Plugin. It would need to be set as a system property for the JVM where the Maven is running.
So you have option to either defined it as an environment variable or specifying it directly in the file.

Reply all
Reply to author
0 new messages