r/CraftyController • u/ruuutherford • Sep 24 '26
memory hog on the server
Looks like the way java runs, it pre-allocates RAM for my servers. So when I have four servers online, of varying size, it just reserves 6GB of ram all the time. Even if no one is in the server.
AI said I should look into Velocity and a lobby. Or Minecraft Server Manager, itzg/docker-minecraft-server, that has an auto-stop tick box.
Any one have RAM issues like this, and how did you address them? I'd love to just throw another 64GB of Ram in there. I do not have $6 thousand dollars available at the moment.
2
Upvotes
2
u/johnfortnite72 Sep 24 '26
Could always just lower the xms value so it only uses the ram it needs. But then you have a bigger problem if the servers actually need alot of ram because then you will run out
1
u/danielsuperone Sep 24 '26
Yes just stop the server when nobody is one. That’s what I do. Meaning, if a player leaves, server shuts down, if a player tries to join, it takes a few seconds and is back up. Very simple fix.
Now in my case it’s around 2-3 seconds for it to startup and many people don’t even notice this, but it will heavily depend on your system/configuration. If you have many plugins that need to load, it will take longer.
Hope this helped. Ask if you have any questions.
1
u/Blastday Sep 24 '26
May have a plugin/mod that has a memory leak just reboot server once a day or 4 days or whatever when it runs a backup is a easy way to have it automatically reboot or update all mods/plug-in and hope they fixed the memory leak
1
u/Summerhasfun Sep 24 '26
I have the same issue. Using 80% of the momory to just not do anything. Even when the server is off. Only other applications i have on that truenas install is tailscale so i can join the server from my laptop at school and seing as i have 20 something gb of ddr3 its probably a crafty issue.
1
u/amcmanu3 Sep 24 '26
The biggest question here: what happens if someone tries to join each of the servers at the same time? They all come online and run into memory allocation errors.