If I have plenty of memory to spare, can I start a Java application( says mMven ) to run using Eden space alone until completion without any GC ?
Yes, I have done this for real applications in Java 6+. I started with a 24 GB Eden space, tiny survivor and tenured spaces. Later I found 8 GB was more than enough.
It would still GC when there was a bug or error, but not under normal operation.
I believe the options were
-Xmn24g -Xmx26g -XX:SurvivorRatio=100
With the default GC.
The application was optimised to produce less than 1 GB/hour so run for a day with a GC.
Yes but not in Java 8. Java 11 will include Epsilon GC (JEP 318) that does nothing to free memory. With any other GC and with large enough heap there is no need to trigger StopTheWorld garbage collection but it isn't guaranteed that it won't happen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With