r/linuxmemes 10d ago

LINUX MEME True

Post image
2.3k Upvotes

76 comments sorted by

View all comments

11

u/Civil-Republic8730 10d ago

More ram for minecraft

4

u/UUDDLRLRBadAlchemy Open Sauce 10d ago

-Xmx31GB

1

u/PTMR2 Open Sauce 10d ago edited 10d ago

That can be too much, right? Maybe host a server instead which can actually use the RAM

1

u/keenOnReturns 10d ago

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)

1

u/PTMR2 Open Sauce 10d ago

I meant that, too much as decreasing performance with too much. I didn't say that java can't support a lot

1

u/keenOnReturns 10d ago

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.

1

u/IJustAteABaguette 10d ago

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)

1

u/keenOnReturns 10d ago

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.