Remix.run Logo
int0x29 a day ago

Set JVM heap to half available memory. Mincraft is very much the kind of appication that benifits from filesystem cache to help with loading chunks.

Also if for some reason you are setting the heap size high avoid going past 32 gb unless you tune object alignment. Allocating between 32 and 47 gb will result in an effectively smaller heap. Allocating more than 32 gb can result in performance penalties.

inigyou a day ago | parent [-]

Wow. When I played Minecraft, 1GB was enough and 4GB was a lot. I know that since 1.8 Microsoft rewrote large parts of the engine to make them less efficient and more ivory-tower, but I didn't know it was that bad.

atomicnumber3 a day ago | parent | next [-]

We're talking for servers, which almost always means modded (even if only server side mods like the bukkit family). Pretty common for servers with more than a dozen people to be running heaps in the 8-16GB range. And one reason for the "large" size is that they can often run with a lot less but when memory isn't that constricted you can tune for smaller GC pause times

int0x29 a day ago | parent | prev | next [-]

This was more a hasty response with modding in mind to the parent comment of "set it as high as you are comfortable with." There are limits to how high you should go. If you are running vanilla you may not need to set the heap to 50%. Anything past 50% or 32 gb isn't a great idea generally.

mudkipdev a day ago | parent | prev [-]

FWIW I still run a server for 5 people with 2GB ram and the performance is fine.