1. Choose an optimized server version
Choosing the server version is one of the first steps toward good performance:
- Paper: Paper is more optimized than Spigot and Bukkit, with many performance improvements.
- Purpur: Based on Paper, Purpur adds more customization options to improve performance and reduce resource usage.
2. Tweaks in the server.properties file
- view-distance: Reducing the view distance can improve performance.
Example: view-distance=6
- spawn-protection: Disable it if you don't need it.
Example: spawn-protection=0
- enable-command-block: Disable it if you don't use it.
Example: enable-command-block=false
3. Install optimization plugins
- ClearLag: Removes dropped items and unnecessary entities.
- WorldBorder: Limits the size of the generated world.
- NoChunkUnload: Makes sure chunks in use aren't unloaded unexpectedly.
4. paper.yml settings
- use-aikar's flags: Significantly improves performance.
use-aikars-flags: true
- max-tick-time: Reduces the impact of heavy operations.
max-tick-time: 60000
5. Reduce the number of entities
- Use the ClearLag plugin to periodically remove unnecessary items and mobs.
- Adjust the mob-spawning settings to limit the number of mobs.
6. Limit the number of concurrent players
- max-players: Set a comfortable limit.
Example: max-players=50
7. Use chunk preloading
- Use the WorldBorder plugin to pre-generate chunks and limit the size of the world.
8. Avoid too many mods on the server
- Make sure you're only using the mods you need and that they're compatible with the server version.
9. Monitor server performance
- Spark: A plugin to monitor performance and pinpoint problems.
- Timings: The
/timings on command provides detailed reports on bottlenecks.
10. Keep the server up to date
Always use the latest version of Paper or Purpur, as they usually include performance improvements and bug fixes.
Final thoughts
Optimizing a Minecraft server is an ongoing process. Adjust the settings, try different options and keep monitoring performance. If you keep having problems, our support team is available to help!