Servers Optimization

From Generations

Optimizing your server is vital to smooth game play for your players

Common

Optimizations you need to make on all configurations, these settings are shared across any server software.

  • Set chunk-writes to false in server.properties. By default, this is set to true. If set to false, your server can save chunks outside the main thread, freeing up a large amount of valuable resources on your main thread
  • If you don't need hostile monsters, set spawn-monsters to false. Monsters have beefed up AI's compared to other mobs, which result in far more math calculations behind the scenes. Disabling them will result in a significant performance boost
  • Read and use server.properties configurations. There are so many pointless plugins/mods out there that simply reproduce what server.properties can do. Don't want the Nether enabled? Set allow-nether to false. You do not need a dedicated plugin/mod to disable it, you're wasting valuable resources
  • Configure your simulation-distance. Simulation distance is how far away Minecraft will continue ticking/calculating blocks and entities, for instance if you set this to 5 farms will no longer continuously check to grow if no players are within 5 chunks. Keep this low! We recommend 4. This can only be in increments of 2 (even numbers)
  • Configure your view-distance. Your view distance dictates a radius of chunks that may be loaded around each player. It may be tempting to keep this high as it determines how far a player may see, but lowering this will give you a huge performance boost. We recommend 5-8.
  • max-tick-time is a watchdog setting for helping catch server lock-ups if it freezes, and causes it to crash & reboot rather than hang forever until an administrator reboots it manually. The default setting of 60000 is too low for modded servers, as they occasionally need to skip a large amount of ticks to catch up which falsely triggers it, resulting in a crash. Add a 0 (600000) to avoid avoidable crashes
  • Pregenerate your world with Chunky Forge or Chunky Fabric. While this isn't as important as it used to be with recent optimizations to chunk generation in newer Minecraft versions, you can still squeeze out some extra performance. It's very important to take in account your storage space, and backup limits while calculating or you will risk data corruption and countless hours of headaches. Use this valuable calculator to determine how much space you'll need for your target world size. The most common mistake is new server creators jumping right in and starting at a high value such as 100,000 which would be nearly 2 TB. Keep in mind, doubling a value of 10k to 20k, does not mean double the world size- it means quadruple. Ensure you have enough space for plenty of backups on your target size as well.
  • Keep things simple. You don't need 200 mods/plugins to be unique. Quality over quantity. Too many mods/plugins introduces too many variables where things can and will go wrong. Remove things you do not use or will not make a valuable impact on your server. The same goes for large mods/plugins that have a huge amount of content- disable features of it you don't plan to use if there are options to, or find simpler alternatives. Just because you're not using something, doesn't mean it isn't still ticking behind the scenes
  • Backups. Don't use mods/plugins to back up your server, it only adds unneeded strain to your server. Use your panel's built in backup functionality, or manually zip your files yourself.
  • Spark is an absolute must on any environment to help diagnose performance issues and find the true culprits. You'll always be asked for a Spark report if you ask for help with lag
  • Using the right JVM Startup Flags is always recommended and will greatly help performance

Fabric

  • Lithium is a great general optimization mod for physics, AI, and blocks
  • Alternate Current optimizes the complicated nature of redstone on servers since you'll have numerous players setting up redstone contraptions
  • FerriteCore optimizes your memory, allowing you to get away with less RAM overall
  • Kyrpton optimizes your networking stack
  • Starlight optimizes the heavy task of lighting

Forge

  • Adaptive Performance Tweaks Gamerules is a valuable server side mod. Gamerules are horribly optimized and this mod will optimize them
  • AI Improvements is a great server side mod that simplifies and optimizes the advanced AI calculations of mobs
  • Alternate Current optimizes the complicated nature of redstone on servers since you'll have numerous players setting up redstone contraptions
  • FerriteCore optimizes your memory, allowing you to get away with less RAM overall
  • Saturn also optimizes your memory usage in a variety of ways
  • Pluto optimizes your networking stack
  • FixMySpawnR optimizes spawner blocks and prevents them from doing countless calculations when a player is nearby
  • Starlight optimizes the heavy task of lighting

ArcLight / Banner

  • If there's a Forge/Fabric alternative to something you need, use it. Forge/Fabric based mods are far more optimized in an hybrid environment than Spigot plugins
  • Refer to the Forge/Fabric section, everything you see there also applies to ArcLight/Banner
  • Fully read and configure your spigot.yml and bukkit.yml configuration files. There are countless optimization guides out there, so we won't reinvent the wheel and list them all again, but we recommend YouHaveTrouble's
  • While ArcLight/Banner provides limitless plugins through Spigot, do be aware that it does add significant overhead and you will essentially be capped around 70 players as the lag will get increasingly worse. Although, most system administrators would likely look into expanding / adding a second server via a network at around that player count anyways, it is something to take note of; as a singular "super server" with hundreds of players is just not viable in this instance and your only option is expanding into a network with multiple smaller capped servers in a hybrid environment. The player count cap also depends on the total number of plugins/mods your server is using, as you may need to cap it at even fewer. For new communities, we recommend keeping your plugin count as low as possible so you can work to port your features over time by hiring developers and/or learning yourself to a pure Forge/Fabric environment and ultimately removing ArcLight/Fabric.
  • A common misconception is stability/frequent crashes, while hybrids were unstable in prior Minecraft versions, they're certainly more stable now. That can change in the future as Minecraft releases new version updates. If you have to use a hybrid setup, we recommend it be just temporary while you grow as a community to be able to afford developers and port things needed to a pure Forge/Fabric instance.