Reduce memory usage
How to optimise your Minecraft server's memory usage.
Last updated
How to optimise your Minecraft server's memory usage.
Last updated
Minecraft servers can experience memory issues, and reducing memory usage can help prevent these problems and optimise server performance effectively.
The most common cause for memory issues is too many chunks being loaded at one time.
The easiest way to change this is by changing the view-distance
value in your server.properties
file. This setting will reduce the number of chunks that are loaded by your server, which will in turn reduce the amount of RAM your server is using.
You can try using to tune how the JVM does garbage collection, specifically how often a GC sweep runs, how long it's allowed to run, how old objects are allowed to be before getting garbage collected, number of cores used for GC sweeps, etc.
We recommend removing plugins, such as ClearLagg, that clear server entities. They tend to use more resources scanning and removing items than not removing the items at all.
You should also remove mob stacker plugins unless strictly required, as stacking naturally spawned entities causes more lag than not stacking them at all due to the server constantly trying to spawn more mobs.
You can try following an to configure server settings and improve performance. It's important to remember that you'll need to tune this to your server's requirements.