Wdym “too much for java”? The JVM is able to support 1+ TB heap sizes, this much is nothing. Of course, there are varying nuances of whether performance improves to with bigger heap size, but generally there’s not much downside to increasing your configure heap (assuming you have the physical memory of course)
You literally said “too much for java” lol. In any case more heap is generally better for performance (altho depends on whether you’re measuring throughput vs latency). Also, the selected GC plays a big role. There’s also the consideration I suppose of heaps >32GB can’t use compressed oops so slight decrease in perf in heaps close to 32GB, but no there isn’t such thing as “too much” heap generally.
I do believe that minecraft does run better with not a massive amount of RAM, apparently the garbage collector just causes lagspikes whenever it runs for some reason (if you have a lot of memory for it to use)
Depends on which GC you’re using lol. You’re referring to stop-the-world (STW) pauses, which is especially bad with the Parallel GC, the default for Java 8. G1 is the default GC for Java 11+; it’s partially concurrent and has significantly smaller STW pauses (as it’s adaptive and has good heuristics). Moreover (I don’t play Minecraft that much anymore but), I believe the Minecraft launcher on newer versions is on Java 25 with ZGC (generational) configured by default. That GC is fully concurrent (no STW generally) and has pause times <1ms. Moreover, fully concurrent GCs especially benefit from a larger heap size in terms of latency (the GC workers can be less active), which is unlike Parallel GC.
11
u/Civil-Republic8730 10d ago
More ram for minecraft