Optimization-guide-for-Minecraft-servers

Optimization guide for Minecraft servers

This guide will help you optimize your Minecraft server to reduce lag and improve the performance.

Java Edition

Vanilla

Consider switching to PaperMC, PaperMC has much better performance than Vanilla and also provides plugins support. PaperMC also patch some vanilla bugs and exploits. If you wish to stay with the bugs and exploits, switch to Fabric with some server sided performance mods. There’s not much you can do to optimize a Vanilla server, one of the main reason is that Vanilla doesn’t support plugins or mods, etc.

Forge

It’s not easy to optimize Forge, specially when using too many mods, heavy mods, etc. We really recommend that you use the mods that are really needed, removing unused mods will help a little bit with improving your server performance. Here we list some options that you can follow to optimize your Forge server:

FabricMC

One of the best ways to reduce lag is using performance mods. You can find a list of performance mods that are server-side only to improve your performance here. Some reasons that might increase lags are described in the following list with a possible solution:

PaperMC

Paper itself is a very good optimized server software but if you continue to have lags or low TPS you can follow the instructions listed below:

Edit your server bukkit.yml file.

  1. Update spawn-limits
    spawn-limits:
      monsters: 50
      animals: 8
      water-animals: 7
      water-ambient: 10
      water-underground-creature: 3
      ambient: 1
    
  2. Update chunk-gc
    chunk-gc:
      period-in-ticks: 400
    
  3. Update ticks-per
    ticks-per:
      animal-spawns: 400
      monster-spawns: 5
      water-spawns: 11
      water-ambient-spawns: 21
      water-underground-creature-spawns: 1
      ambient-spawns: 31
      autosave: 6000
    

    Edit your spigot.yml file.

  4. Update save-user-cache-on-stop-only
    settings:
      save-user-cache-on-stop-only: true
    
  5. Update merge-radius
    world-settings:
      default:
     merge-radius:
       item: 4.0
       exp: 6.0
    
  6. Update item-despawn-rate
    world-settings: 
      default:
     item-despawn-rate: The-Value-You-Think-Would-Be-Better
    
    • Note: this will update the time in ticks it takes for ground items to get removed.
  7. Update mob-spawn-range
    world-settings:
      default:
     mob-spawn-range: 6
    
  8. Update max-tick-time
    world-settings:
      default:
     max-tick-time:
       tile: 1000
       entity: 1000
    
  9. Update nerf-spawner-mobs
    world-settings:
      default:
     nerf-spawner-mobs: true
    
  10. Update entity-activation-range
    world-settings:
      default:
     entity-activation-range:
       animals: 16
       monsters: 24
       raiders: 48
       misc: 8
    
  11. Update tick-inactive-villagers
    world-settings:
      default:
     entity-activation-range:
       tick-inactive-villagers: false
    

    Edit your server paper.yml

  12. Update max-auto-save-chunks-per-tick
    world-settings:
      default: 
     max-auto-save-chunks-per-tick: 6
    
  13. Update disable-chest-cat-detection
    world-settings:
      default: 
     game-mechanics:
       disable-chest-cat-detection: true
    
  14. Update optimize-explosions
    world-settings:
      default:
     optimize-explosions: true
    
  15. Update mob-spawner-tick-rate
    world-settings:
      default:
     mob-spawner-tick-rate: 2
    
  16. Update disable-chest-cat-detection
    world-settings:
      default:
     game-mechanics:
       disable-chest-cat-detection: true
    
  17. Update container-update-tick-rate
    world-settings:
      default:
     container-update-tick-rate: 3
    
  18. Update max-entity-collisions
    world-settings:
      default:
     max-entity-collisions: 2
    
  19. Update grass-spread-tick-rate
    world-settings:
      default:
     grass-spread-tick-rate: 4
    
  20. Update despawn-ranges
    world-settings:
      default:
     despawn-ranges:
       monster:
         soft: 28
         hard: 96
       creature:
         soft: 28
         hard: 128
       ambient:
         soft: 28
         hard: 96
       axolotls:
         soft: 28
         hard: 96
       underground_water_creature:
         soft: 28
         hard: 96
       water_creature:
         soft: 28
         hard: 96
       water_ambient:
         soft: 28
         hard: 64
       misc:
         soft: 28
         hard: 96
    
  21. Update disable-move-event
    world-settings:
      default:
    hopper:
      disable-move-event: true
    
  22. Update non-player-arrow-despawn-rate
    world-settings:
      default:
    non-player-arrow-despawn-rate: 60
    
  23. Update creative-arrow-despawn-rate
    world-settings:
      default:
    creative-arrow-despawn-rate: 60
    
  24. Udpate prevent-moving-into-unloaded-chunks
    world-settings:
      default:
    prevent-moving-into-unloaded-chunks: true
    
  25. Update use-faster-eigencraft-redstone
    world-settings:
      default:
    use-faster-eigencraft-redstone: true
    
  26. Update armor-stands-tick
    world-settings:
      default:
    armor-stands-tick: false
    
  27. Update per-player-mob-spawns
    world-settings:
      default:
    per-player-mob-spawns: true
    

SpigotMC

You can try the suggestions given in the section “PaperMC”. PaperMC is a fork of Spigot, therefore the server has the bukkit.yml and spigot.yml files.

MohistMC

You can try and test the suggestions given for Forge and PaperMC servers since MohistMC is a combination of both server software.

Modpacks

It’s hard to have a good performance using modpacks, mostly because modpacks usually have too many heavy mods. Some solutions are mentioned in the list below:

Bedrock Edition

Bedrock

There’s no way to optimize a Bedrock server because we cannot add modifications, plugins or update settings that may improve the server performance. Although, Bedrock servers don’t really have a bad performance (most of the time).

PocketMine-MP

We suggest not using Pocketmine if you want to miss the updates of new Minecraft versions. Pocketmine is missing several features and all updates above 1.12 are not added to Pocketmine, also many gamerules are missing. Please do not use Pocketmine for a survival experience. The best way to get a better performance is using some optimization plugins (if they even exist).

Credits