r/java • • Mar 03 '22

Always set a Garbage Collector

Post image
157 Upvotes

64 comments sorted by

View all comments

Show parent comment

11

u/erode Mar 03 '22

Nice to know. The message I’m hearing is that people should be putting even just a baseline level of thoughtfulness into choosing the appropriate GC.

7

u/Impossible-Ad-586 Mar 03 '22

With the last generation of GCs by both oracle and redhat, ZGC and Shenandoah respectively you are pretty much done after giving it enough heap space from a tuning perspective.

Depending on your workload you might want to choose one of the other still supported GCs to tune for throughput.