Comment by esaym

Comment by esaym 7 hours ago

3 replies

These modern garbage collectors are not simply free though. I got bored last year and went on a deep dive with GC params for Minecraft. For my needs I ended up with: -XX:+UseParallelGC -XX:MaxGCPauseMillis=300 -Xmx2G -Xms768M

When flying around in spectator mode, you'd see 3 to 4 processes using 100%. Changing to more modern collectors just added more load to the system. ZGC was the worst, with 16+ processes all using 100% cpu. With the ParallelGC, yes you'll get the occasional pause but at least my laptop is not burning hot fire.

plandis 6 hours ago

Yes no GC is free (well perhaps Epsilon comes close :)

It’s a low pause GC so latencies, particularly tail latencies, can be more predictable and bounded. The tradeoff you make is that it uses more CPU time and memory in order to operate.

namibj 6 hours ago

You'll need more spare heap for ZGC.

  • ackfoobar 5 hours ago

    And using generational ZGC will probably lower CPU usage a lot.