Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
jvx:best_practice [2025/05/22 14:15] admin |
jvx:best_practice [2025/05/22 14:19] (current) admin |
||
---|---|---|---|
Line 6: | Line 6: | ||
We didn't find memory leaks in JVx, but sometimes memory consumption is higher than expected. We tried a lot of settings and profiling tools to find problems in JVX, without success. In the end we configured the gc to free memory reliable. With one of our JVM settings, application server memory consumption is as expected: | We didn't find memory leaks in JVx, but sometimes memory consumption is higher than expected. We tried a lot of settings and profiling tools to find problems in JVX, without success. In the end we configured the gc to free memory reliable. With one of our JVM settings, application server memory consumption is as expected: | ||
- | G1GC (available in Java 8 and later) | + | * G1GC //(available in Java 8 and later)// <code>-XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+ExplicitGCInvokesConcurrent -XX:+UseStringDeduplication -XX:InitiatingHeapOccupancyPercent=0</code> This will release all the memory sooner or later even when idle (8 minutes) |
+ | * ZGC //(JVM >= 11, slightly more memory intensive)// <code>-XX:+UseZGC -XX:+ExplicitGCInvokesConcurrent -XX:ZCollectionInterval=30</code> | ||
- | -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+ExplicitGCInvokesConcurrent -XX:+UseStringDeduplication -XX:InitiatingHeapOccupancyPercent=0 | + | * ZGC //(JVM >= 21)// <code>-XX:+UseZGC -XX:+ZGenerational -XX:+UnlockExperimentalVMOptions -XX:+ExplicitGCInvokesConcurrent -XX:+ZProactive -XX:ZCollectionInterval=30</code> |
- | + | ||
- | This will release all the memory sooner or later even when idle (8 minutes) | + | |
- | + | ||
- | ZGC (JVM >= 11, slightly more memory intensive) | + | |
- | + | ||
- | -XX:+UseZGC -XX:+ExplicitGCInvokesConcurrent -XX:ZCollectionInterval=30 | + | |
- | + | ||
- | ZGC (JVM >= 21) | + | |
- | + | ||
- | -XX:+UseZGC -XX:+ZGenerational -XX:+UnlockExperimentalVMOptions -XX:+ExplicitGCInvokesConcurrent -XX:+ZProactive -XX:ZCollectionInterval=30 | + | |