3 ms·
Been using it for months for a Minecraft server. Runs 10+ players with mods without much difficulty. I limited the RAM usage to 6GB though so that the Garbage C
by gjsman-1000 5y ago
Been using it for months for a Minecraft server. Runs 10+ players with mods without much difficulty. I limited the RAM usage to 6GB though so that the Garbage Collector doesn't go nuts.
- andai 5y agoWait, are you saying Java performs worse if you give it more memory to work with?
- dijit 5y agoIt can. GC pauses cause stuttering. More memory is a longer GC pause. This is only the case if you allocate and deallocate a lot. Also: never go larger than 32GiB on heap else you’ll end up with 64bit inter pointers: that will seriously degrade performance.
- sulam 5y agoThis very much depends on the GC you're using. But yes, a full GC will take longer the more memory you have. Therefore you want to avoid full GCs like the plague.
- sz4kerto 5y agoNo. More accurately: with very large heaps the default performance characteristics of the GC might be different than what you’d like it to be. For example you might get huge throughput but occasional long GC pauses. But it’s all tunable.
- winrid 5y agoNo. A bigger heap means more work for a memory manager. If you just give it more memory, but your app doesn't use it, no harm done. Honestly Java in 2021 can handle huge heaps pretty well. Not sure which GC they are running.
- schmorptron 5y agoUuuh, good idea!