How do i change the max ram that minecraft uses on my linode?
im using the marketplace installer from linode to run a minecraft server, my linode has 8gb of ram but i found out that the start script launches it with 1gb of ram max and i can see that i have extra ram thats not being used and my server is lagging and freezing because of it. is there anyway to change it?
1 Reply
✓ Best Answer
Hey there,
You can allocate additional memory (RAM) to your Minecraft server by modifying the /home/$USER/lgsm/config-lgsm/mcserver/mcserver.cfg
file to include the following section from _default.cfg
:
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parame>
javaram="4096" # -Xmx$4096M
In the example above, this would allocate 4096MB or 4GB to your server. If your Linode has 8GB of RAM, you would put 8192 instead of 4096, etc.
After making this change, save the mcserver.cfg
file and restart the mcserver.service
.
Running top
should verify that the server is now using additional memory.
Cheers,
Eric