Turn on JEP 346 (Promptly Return Unused Committed Memory from G1).
This tunes G1 so it performs a full GC and releases the memory
reclaimed back to the OS once every 5 minutes.
See: https://openjdk.java.net/jeps/346
Before:
NAME CPU(cores) MEMORY(bytes)
mulkcms2-857469cf-p9rvx 1m 428Mi
After:
NAME CPU(cores) MEMORY(bytes)
mulkcms2-74d8c8f69-wvfz8 3m 337Mi
Change-Id: I2f6272ad83665f9ee0810c435d0511fd8807697d
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 87f49c8..914f517 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -86,6 +86,7 @@
quarkus.jib.base-jvm-image = azul/zulu-openjdk-alpine:15-jre
#quarkus.jib.jvm-arguments = -XX:+UseShenandoahGC,-XX:ShenandoahGCHeuristics=compact
+quarkus.jib.jvm-arguments = -XX:G1PeriodicGCInterval=300000,-XX:G1PeriodicGCSystemLoadThreshold=0
quarkus.native.container-runtime = docker