How to set heap size for Quarkus app using Jib container image?

1.1k Views Asked by At

I'm Quarkus 1.11.0 and trying to set the heap size of my app using...

quarkus.jib.jvm-arguments=-Xms1024m -Xmx1024m -agentpath:/app/resources/libyjpagent.so=listen=all also tried with capital M and I get Invalid initial heap size and the app exits.

I also tried through the env JAVA_OPTS and JAVA_TOOL_OPTIONS and these don't seem to do anything, the app just runs but the heap size is not set.

2

There are 2 best solutions below

0
On

In addition to geoand's answer, use a comma-separated list, like so:

quarkus.jib.jvm-additional-arguments=-XX:MaxRAMPercentage=75.0,-XX:+UnlockExperimentalVMOptions,-XX:+UseG1GC,-XX:MaxHeapFreeRatio=15,-XX:MinHeapFreeRatio=5
2
On

You can use quarkus.jib.jvm-additional-arguments if you just want to add arguments.