Website setup
Icon
Themes
Dark
Copyright

How to Optimize Minecraft Server

You want a Server? Rent your own server
fully customized Layten Hosting

Minecraft Server Optimization

Note for users that are on vanilla, Fabric or Spigot (or anything below Paper)

Go to your server.properties and change sync-chunk-writes to false This option is forcibly set to false on Paper and its forks, but on other server implementations you need to switch this manually. This allows the server to save chunks off the main thread, reducing the load on the main tick loop.

Guide for version 1.19. Some things may still apply to versions 1.15 - 1.18.

Based on this guide and other sources.

Intro

There will never be a guide that will give you perfect results. Each server has their own needs and limits on how much performance you can sacrifice. The goal of this guide is helping you understand which options impact performance and what exactly they change.

Preparations

Server JAR

Your choice of server software can make a huge difference in performance and API possibilities. There are currently multiple viable popular server JARs.

Recommended top picks:

Avoid:

Map Pregen

World pregeneration can help servers with limited CPUs or servers using map plugins.

A recommended plugin for this is: Chunky

Make sure to configure a world border. The overworld, nether and end have different borders.

Important: Use: /worldborder set [diameter] because it prevents expensive searches such as treasure maps from creating lag spikes.

Configurations

Networking

server.properties

network-compression-threshold

Recommended value: 256

This controls when packets are compressed. Higher values reduce CPU usage but increase bandwidth usage.

purpur.yml

use-alternate-keepalive

Recommended value: true

Purpur's alternate keepalive system helps players with unstable connections remain connected longer.


Chunks

server.properties

simulation-distance

Recommended value: 4

Simulation distance controls how far away from players Minecraft processes activity such as farms, furnaces and crops. Lower values improve performance.

view-distance

Recommended value: 7

Controls how many chunks are sent to players. A lower value reduces server load.

spigot.yml

view-distance

Keep this as: default so server.properties controls the distance.

paper-world.yml

delay-chunk-unloads-by

Recommended value: 10s

Keeps chunks loaded temporarily after players leave, avoiding constant loading and unloading.

max-auto-save-chunks-per-tick

Recommended value: 8

Spreads world saving tasks over time, reducing performance spikes.

prevent-moving-into-unloaded-chunks

Recommended value: true

Prevents players from forcing chunk loading that can freeze the main server thread.

entity-per-chunk-save-limit

area_effect_cloud: 8
arrow: 16
dragon_fireball: 3
egg: 8
ender_pearl: 8
experience_orb: 16
fireball: 8
firework_rocket: 8
potion: 8
shulker_bullet: 8
snowball: 8
spectral_arrow: 16
trident: 16
wither_skull: 4

Limits how many entities of each type can be saved per chunk. Useful to prevent crashes caused by huge amounts of projectiles.

pufferfish.yml

max-loads-per-projectile

Recommended value: 8

Controls how many chunks projectiles can load during their lifetime. Lower values reduce chunk loading caused by entities.


Mobs

bukkit.yml

spawn-limits

monsters: 20
animals: 5
water-animals: 2
water-ambient: 2
water-underground-creature: 3
axolotls: 3
ambient: 1

Spawn limits reduce the amount of entities your server needs to process.

ticks-per

monster-spawns: 10
animal-spawns: 400
water-spawns: 400
water-ambient-spawns: 400
water-underground-creature-spawns: 400
axolotl-spawns: 400
ambient-spawns: 400

Controls how often Minecraft tries to spawn entities. Increasing these values can improve performance.

spigot.yml

mob-spawn-range

Recommended value: 2

Reduces the area where mobs can spawn around players.

entity-activation-range

animals: 16
monsters: 24
raiders: 48
misc: 8
water: 8
villagers: 16
flying-monsters: 48

Entities outside this range receive fewer updates, reducing CPU usage.

entity-tracking-range

players: 48
animals: 48
monsters: 48
misc: 32
other: 64

Controls the distance where entities are visible to players.

tick-inactive-villagers

Recommended value: false

Stops villagers outside activation range from constantly ticking.

nerf-spawner-mobs

Recommended value: true

Reduces AI processing from mobs created by spawners.

paper-world configuration

despawn-ranges

ambient:
  hard: 56
  soft: 30

creature:
  hard: 56
  soft: 30

monster:
  hard: 56
  soft: 30

water_creature:
  hard: 56
  soft: 30

Controls when entities disappear. Lower values help servers with many mobs.

per-player-mob-spawns

Recommended value: true

Creates a more balanced mob spawning system between players.

max-entity-collisions

Recommended value: 2

Limits how many entity collisions are calculated.

update-pathfinding-on-block-update

Recommended value: false

Reduces unnecessary mob path calculations.

armor-stands.tick

Recommended value: false

Improves performance when using many armor stands.

pufferfish.yml

dab.enabled

Recommended value: true

Dynamic Activation of Brain reduces AI updates for distant mobs.

dab.max-tick-freq

Recommended value: 20

Controls how often distant entities update.

dab.activation-dist-mod

Recommended value: 7

Controls the distance where DAB starts reducing AI updates.

purpur.yml

zombie.aggressive-towards-villager-when-lagging

Recommended value: false

entities-can-use-portals

Recommended value: false

Prevents entities from loading chunks by moving through portals.

villager.brain-ticks

Recommended value: 2

Controls villager brain updates.

villager.lobotomize.enabled

Recommended value: true

Stops villagers with broken paths from consuming resources.


Misc

spigot.yml

merge-radius

item: 3.5
exp: 4.0

Combines dropped items and experience orbs, reducing the amount of entities on the ground.

hopper-transfer

Recommended value: 8

Controls how often hoppers transfer items. Higher values improve performance.

hopper-check

Recommended value: 8

Controls how often hoppers check inventories.

paper-world configuration

alt-item-despawn-rate

enabled: true

items:
  cobblestone: 300
  netherrack: 300
  sand: 300
  dirt: 300
  gravel: 300
  kelp: 300
  bamboo: 300
  sugar_cane: 300
  leaves: 300

Allows specific items to disappear faster, reducing entity load.

redstone-implementation

Recommended value: ALTERNATE_CURRENT

Uses a faster redstone calculation system to reduce unnecessary updates.

hopper.disable-move-event

Recommended value: false

Keep disabled unless you know your plugins do not require hopper events.

optimize-explosions

Recommended value: true

Uses a faster explosion calculation system.

treasure-maps.enabled

Recommended value: false

Treasure maps can create heavy chunk searches.

Helpers

Anti X-Ray

Recommended value: true

Paper Anti-Xray prevents players from seeing hidden ores.

Nether roof protection

Recommended value: 127

Prevents players from reaching above the Nether roof.


Java Startup Flags

Minecraft 1.19+ requires Java 17 or newer. Recommended distributions:

For better garbage collection performance, use optimized JVM flags for Minecraft servers.

java -Xms4G -Xmx4G \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC \
-jar paper.jar nogui

Plugins That Do Not Help

Item clearing plugins

Many item cleaner plugins are unnecessary. Use: merge-radius and: alt-item-despawn-rate instead.

Mob stacker plugins

Mob stacking can sometimes increase lag because the server continues processing spawning logic.

Plugin reloaders

Avoid plugins that enable or disable plugins while the server is running. They can create dependency problems and unstable behavior.


Measuring Performance

MSPT

Paper provides: /mspt to check server tick performance. Lower values mean better performance.

Timings

Use: /timings paste to generate a report showing what consumes server resources.

Spark

Spark is a profiler that helps identify CPU and memory problems.

Download: Spark