While I do agree to some point with the existing answers, increasing to -XX:MaxPermSize=512M
will help and even up to -XX:MaxPermSize=1G
should not hurt, assuming your server has that amount of physical RAM, a word of advice regarding the total heap size, which is configured by increasing -Xmx=xGB
.
In general this will increase the available memory for the program, which is good, since the JVM (Java Virtual Machine, essentially the program running your minecraft server) will have more memory to put 'stuff' into. At a certain point, there will however be a great drawback. As you go into the 10s of gigabytes, the JVM becomes more and more inefficient to handle this much memory without advice.
As more and more memory is needed, you need to tell the JVM what exactly the memory is primarily used for (this depends weather your java objects are rather short- or long-lived). I am not sure regarding how Minecraft handles this memory, as I come from another java field (J2EE), but the bigger the total RAM, the more likely you need to tune your server to the specific requirement for the application.
Specifically you will need to tune the garbage collector to rather have minimal stop-the-world pauses (basically where your server completely stands still and seemingly does nothing). Using -XX:+UseConcMarkSweepGC
will help that a lot. Using -XX:CMSClassUnloadingEnabled
will only help to keep your PermGen (-XX:MaxPermSize
) clean but not keeping your overall heap clean. For the former case, there are literally dozens of settings that need to be considered.
TL;DR:
For a very big server there is a lot more to tune than just the -XX:MaxPermSize
. A PermSize of around -XX:MaxPermSize=1G
and a heap around -Xmx=4G
to -Xmx=6G
should still be fairly safe. I would not go much beyond this to keep server performance.
Of course the MaxPermSize + Xmx should never be higher than the RAM installed in your computer. It will start swapping which will reduce performance by some magnitudes.