Question

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:

  • time of the day (timezone of the players)
  • number of players
  • settings
  • circumstances

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top