Reputation: 7062
I run an arch linux server with 8 Minecraft servers. This server has 64GB of RAM. Unfortunately, I'm running out of memory, causing linux to kill processes.
If I tweak the -xmx settings for the individual JVM's, I can easily stay under 64GB while retaining good performance. But this is not ideal, since the load of the different JVM's can vary wildly depending on:
So for example if I set -xmx8G to all servers this would be way too much for a server with just a few players online, but not enough for a server that is from a busy timezone and is currently generating a new world.
Ideally I would like to set one 64GB limit for all the JVM's together. Is this possible?
(don't know if this is relevant: the JVM's are running under different users. This is handy, but it is not a requirement that it stays that way)
Any tips are appreciated!
Upvotes: 3
Views: 490
Reputation: 1159
unfortunately the amount of Xmx must fit into you virtual memory.
you may add a huge swap space to get more virtual memory for your processes. I observed, that processes tend to stay in swap space once they got memory pages from there. a little trick is to add another swap of same size as your first and turn the first one off. pages will swap in back into physical RAM. add this as a regular maintainance task.
Upvotes: 2