Optimize the performance of a Minecraft server

This guide explains what each setting does, which value we recommend, and why it can improve server performance. It is mainly intended for Paper, Purpur, or Pufferfish servers.


Index

  • 1. Choose the right server software
  • 2. server.properties settings
  • 3. bukkit.yml settings
  • 4. spigot.yml settings
  • 5. Paper, Purpur, and Pufferfish settings
  • 6. Java and JVM configuration
  • 7. Monitoring and diagnostics
  • 8. Additional best practices

Before you start

Before modifying any file, we recommend:

  • Stop the server before editing important configuration files.
  • Create a backup of every file you are going to modify.
  • Apply changes gradually and measure the results with Spark, TPS, and MSPT.
  • Do not copy extreme configurations without understanding them, because they can affect gameplay.

Recommended goal: keep the server close to 20 TPS and with stable MSPT below 50 ms. If MSPT stays above 50 ms, the server cannot process each tick on time and lag starts.


1. Choose the right server software

The server software is the foundation of performance. Using a poorly optimized JAR can limit performance even with good hardware.

Software Recommendation Explanation
Paper Recommended for most servers Much more optimized than Spigot while keeping high compatibility with Bukkit/Spigot plugins.
Pufferfish Recommended for higher-load servers Adds extra optimizations on top of Paper, especially for pathfinding, entities, and general load.
Purpur Recommended if you need more customization Based on Pufferfish. Allows you to change many gameplay behaviors without relying on too many plugins.
Spigot Not recommended for best performance It works, but it is less optimized than Paper and its forks.
CraftBukkit Not recommended Older option with fewer modern optimizations.

Recommended option: use Paper if you want stability and compatibility. Use Purpur if you need more configuration options. Avoid paid "miracle" JARs or unknown builds.


2. server.properties settings

File: server.properties

This file controls general server settings such as render distance, simulation distance, networking, spawning, and base behavior.

2.1 sync-chunk-writes

sync-chunk-writes=false

What it does: defines whether chunk saving is performed synchronously or asynchronously.

Recommended value: false.

Why: when set to false, Paper can save chunks more efficiently without blocking the main server thread as much. This reduces stutters and lag spikes during world saving.

Warning: use it only on Paper, Purpur, or compatible forks. On modern Paper/Purpur servers, this is a common setting.

2.2 simulation-distance

simulation-distance=4

What it does: controls the distance, in chunks, where the server processes entities, mobs, crops, redstone, and other active systems around each player.

Recommended value: between 4 and 6.

Practical recommendation: for servers with many players or limited resources, use 4. For smaller servers or stronger hardware, use 5 or 6.

Why: this is one of the settings with the highest CPU impact. The higher it is, the more active chunks the server must process per connected player.

2.3 view-distance

view-distance=7

What it does: controls how many chunks each player can see around them. It affects how many chunks are sent to the client.

Recommended value: between 6 and 8.

Practical recommendation: use 7 as a balanced value. We do not recommend going below 6 unless strictly necessary.

Why: lowering this value reduces network usage, memory usage, and chunk sending. However, if it is too low, players will notice a poor visual experience.

Important rule: simulation-distance should be lower than or equal to view-distance.

2.4 entity-broadcast-range-percentage

entity-broadcast-range-percentage=75

What it does: reduces the range where the server sends entity data to players.

Recommended value: 75.

Aggressive option: 50 if you have many players or many entities.

Why: it reduces packets sent to clients and lowers network load. It can also help when many entities are visible, such as mobs, animals, or dropped items.

Gameplay impact: if set too low, some entities may visually appear later for players.

2.5 max-players

max-players=50

What it does: defines the maximum number of players that can join the server.

Recommended value: set a realistic limit based on CPU, RAM, plugins, and server type.

Why: setting a high number only for appearance is not recommended. The limit should match the real capacity of the server to avoid saturation.

2.6 allow-flight

allow-flight=true

What it does: allows players to fly when using plugins, game modes, or systems that require it.

Recommended value: true if you use flight plugins, advanced anticheats, or special movement systems.

Why: on some servers, leaving it as false can kick players by false positive if a plugin moves them, if there is lag, or if special abilities are used.


3. bukkit.yml settings

File: bukkit.yml

This file controls spawns, mob limits, and how often the server attempts to generate entities.

3.1 spawn-limits

spawn-limits:
  monsters: 20
  animals: 5
  water-animals: 2
  water-ambient: 2
  ambient: 1

What it does: limits the maximum number of mobs that can exist per player in different categories.

Recommended values:

  • monsters: 20 reduces hostile mob load.
  • animals: 5 prevents excessive passive animals.
  • water-animals: 2 reduces heavy aquatic entities.
  • water-ambient: 2 reduces fish and aquatic ambient entities.
  • ambient: 1 reduces bats and ambient mobs.

Why: mobs consume CPU through AI, movement, collisions, and pathfinding. On servers with many players, default values can create too many active entities.

Gameplay impact: values that are too low can make the world feel empty or reduce farm output.

3.2 ticks-per

ticks-per:
  monster-spawns: 5
  animal-spawns: 400
  water-spawns: 400
  ambient-spawns: 400

What it does: defines how many ticks pass before the server attempts to spawn mobs.

Recommended value: keep monster-spawns at 5 and raise animals, water, and ambient spawns to 400.

Why: reduces spawn attempts for less important entities. This lowers CPU load without heavily breaking gameplay.

Important: Minecraft normally runs at 20 ticks per second. A value of 400 is approximately 20 seconds between attempts.


4. spigot.yml settings

File: spigot.yml

This file contains important optimizations for entities, AI activation, spawner mobs, dropped items, and hoppers.

4.1 entity-activation-range

world-settings:
  default:
    entity-activation-range:
      animals: 16
      monsters: 24
      raiders: 48
      misc: 8
      water: 8
      villagers: 16
      flying-monsters: 48
    tick-inactive-villagers: false

What it does: defines the distance at which an entity remains active and processes AI.

Recommended values:

  • animals: 16 reduces AI for distant animals.
  • monsters: 24 keeps hostile mobs active at a reasonable distance.
  • raiders: 48 prevents raid issues by keeping them active farther away.
  • misc: 8 reduces load from miscellaneous entities.
  • water: 8 reduces aquatic mob load.
  • villagers: 16 reduces villager load, which is often expensive.
  • flying-monsters: 48 keeps flying mobs functional at a longer distance.
  • tick-inactive-villagers: false avoids processing inactive villagers.

Why: entity AI is one of the most common sources of lag. Reducing activation range prevents the server from processing entities that are far away from players.

Gameplay impact: if values are too low, mobs or animals may appear less responsive until the player gets closer.

4.2 merge-radius

    merge-radius:
      item: 4.0
      exp: 6.0

What it does: defines how close dropped items and experience orbs must be to merge together.

Recommended value: item: 4.0 and exp: 6.0.

Why: many dropped items create many entities. Merging them reduces the number of entities the server must process.

Gameplay impact: values that are too high may make items merge from too far away, which can feel unnatural.

4.3 mob-spawn-range

    mob-spawn-range: 4

What it does: defines the chunk radius where mobs can spawn around each player.

Recommended value: 4.

Why: helps mobs spawn inside areas that are actually being simulated. It should be aligned with simulation-distance.

Recommended rule: mob-spawn-range should be lower than or equal to simulation-distance.

4.4 nerf-spawner-mobs

    nerf-spawner-mobs: true

What it does: disables normal AI for mobs created by spawners until a player is close.

Recommended value: true.

Why: spawner farms can accumulate many entities. Reducing their AI greatly lowers CPU usage.

Gameplay impact: it can affect farms that depend on normal mob behavior, although it is a recommended optimization for most survival servers.

4.5 hopper-transfer and hopper-check

    hopper-transfer: 8
    hopper-check: 8

What they do:

  • hopper-transfer defines how many ticks pass before a hopper transfers items.
  • hopper-check defines how many ticks pass before a hopper checks for items to pick up or move.

Recommended value: 8 and 8.

Why: hoppers can use a lot of CPU, especially in large farms. Increasing these values reduces check frequency.

Gameplay impact: hoppers will work slower than vanilla, but the server will be more stable.


5. Paper, Purpur, and Pufferfish settings

Depending on the version, these options may be located in paper-global.yml, paper-world-defaults.yml, or files inside the config folder.

5.1 redstone-implementation

  redstone-implementation: ALTERNATE_CURRENT

What it does: changes the redstone engine implementation.

Recommended value: ALTERNATE_CURRENT, if your version supports it.

Why: Alternate Current usually improves redstone performance and reduces unnecessary calculations.

Gameplay impact: it may change very specific technical redstone behavior. If your server has complex redstone machines, test it first.

5.2 use-faster-eigencraft-redstone

  use-faster-eigencraft-redstone: true

What it does: enables an alternative redstone optimization where available.

Recommended value: true, if your version still uses this option.

Why: reduces load generated by redstone circuits.

Note: newer versions may not use this parameter anymore or may replace it with redstone-implementation.

5.3 hopper disable-move-event

  hopper:
    disable-move-event: true

What it does: prevents a plugin event from firing every time a hopper moves an item.

Recommended value: true if you do not rely on plugins that track hopper item movement.

Why: on servers with many hoppers, constant events can create a lot of load.

Warning: if you use protection, logging, antigrief, or economy plugins that need to detect hopper item movement, you may need to keep it as false.

5.4 ignore-occluding-blocks

  hopper:
    ignore-occluding-blocks: true

What it does: optimizes checks related to solid blocks above or near hoppers.

Recommended value: true.

Why: reduces unnecessary checks in large hopper systems.

5.5 cooldown-when-full

  hopper:
    cooldown-when-full: true

What it does: applies cooldown to full hoppers so they do not constantly attempt to move items.

Recommended value: true.

Why: a full hopper checking constantly creates load without doing useful work. This option reduces that unnecessary work.

5.6 per-player-mob-spawns

  entities:
    per-player-mob-spawns: true

What it does: calculates mob spawning per player instead of using a less balanced global behavior.

Recommended value: true.

Why: improves mob distribution between players and prevents one area or player from consuming too much of the global mob cap.

5.7 max-entity-collisions

  entities:
    max-entity-collisions: 2

What it does: limits how many collisions an entity processes with other entities.

Recommended value: 2.

Why: many entities together, such as cows, villagers, or farm mobs, generate many collision calculations. Limiting this reduces CPU usage.

Gameplay impact: very low values may make entities push each other less.

5.8 prevent-moving-into-unloaded-chunks

  prevent-moving-into-unloaded-chunks: true

What it does: prevents players or entities from moving into chunks that are not loaded.

Recommended value: true.

Why: reduces errors, stutters, and situations where the server needs to load chunks suddenly.

5.9 delay-chunk-unloads-by

  delay-chunk-unloads-by: 10s

What it does: delays unloading chunks after they are no longer used.

Recommended value: 10s.

Why: prevents repeatedly loading and unloading the same chunk when a player moves near the edge of loaded areas.

Impact: it may use slightly more memory, but improves stability and reduces spikes.

5.10 max-auto-save-chunks-per-tick

  max-auto-save-chunks-per-tick: 6

What it does: limits how many chunks the server can automatically save per tick.

Recommended value: 6.

Why: prevents strong disk write spikes during automatic saving.

Note: if the server has very fast storage, this can be adjusted higher. If there are I/O spikes, lowering it can help.

5.11 treasure-maps

  treasure-maps:
    enabled: false

What it does: disables treasure maps that search for far away structures.

Recommended value: false, especially on public survival servers.

Why: structure searching can force chunk generation or far-away chunk lookups and cause lag spikes.

Gameplay impact: treasure maps will no longer work like vanilla.


6. Extra Purpur settings

File: purpur.yml

6.1 Villager lobotomize

  villager:
    lobotomize:
      enabled: true

What it does: reduces AI for villagers that do not need full behavior processing.

Recommended value: true on servers with many villagers or trading halls.

Why: villagers are expensive entities because of their routines, pathfinding, and jobs.

Gameplay impact: it may change natural villager behavior. Test it first if your server heavily depends on vanilla villager mechanics.

6.2 entities-can-use-portals

  entities-can-use-portals: false

What it does: prevents entities from using portals.

Recommended value: false.

Why: reduces situations where entities force dimensions or chunks to load.

6.3 zombie aggressive towards villager when lagging

  zombie:
    aggressive-towards-villager-when-lagging: false

What it does: prevents zombies from continuing to process aggression toward villagers when the server is lagging.

Recommended value: false.

Why: reduces pathfinding and AI calculations when the server is already under pressure.


7. Java and JVM configuration

Modern Minecraft requires updated Java. For Minecraft 1.20.5 or newer, we recommend Java 21 or newer.

7.1 Minimum and maximum memory

-Xms8G -Xmx8G

What it does:

  • -Xms defines the initial memory allocated to Java.
  • -Xmx defines the maximum memory Java can use.

Recommended value: use the same value for -Xms and -Xmx.

Why: prevents Java from resizing the heap while running, reducing pauses and irregular behavior.

7.2 Recommended Aikar's Flags

java -Xms8G -Xmx8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -jar server.jar nogui

What these flags do:

  • -XX:+UseG1GC: uses the G1 Garbage Collector, recommended for Minecraft servers.
  • -XX:+ParallelRefProcEnabled: processes references in parallel to reduce pauses.
  • -XX:MaxGCPauseMillis=200: sets a GC pause target in milliseconds.
  • -XX:+UnlockExperimentalVMOptions: enables experimental options required by some flags.
  • -XX:+DisableExplicitGC: prevents plugins or code from manually calling GC and causing pauses.
  • -XX:+AlwaysPreTouch: reserves and prepares memory on startup, improving runtime stability.
  • -XX:G1NewSizePercent=30 and -XX:G1MaxNewSizePercent=40: tune young generation size.
  • -XX:G1HeapRegionSize=8M: defines heap region size.
  • -XX:G1ReservePercent=20: reserves memory to avoid problems during collection.
  • -XX:G1HeapWastePercent=5: controls how much heap waste is allowed before cleanup.
  • -XX:G1MixedGCCountTarget=4: adjusts the target number of mixed GC cycles.
  • -XX:InitiatingHeapOccupancyPercent=15: starts GC earlier to avoid excessive buildup.
  • -XX:G1MixedGCLiveThresholdPercent=90: defines the threshold for regions considered in mixed GC.
  • -XX:G1RSetUpdatingPauseTimePercent=5: limits time spent updating remembered sets.
  • -XX:SurvivorRatio=32: adjusts survivor space ratio.
  • -XX:+PerfDisableSharedMem: disables shared performance memory to reduce overhead.
  • -XX:MaxTenuringThreshold=1: controls how long objects survive before promotion.
  • -jar server.jar nogui: starts the server JAR without a graphical interface.

Recommendation: do not assign all physical RAM to the server. Leave memory available for the operating system, files, cache, panel, database, and other processes.


8. Monitoring and diagnostics

8.1 Spark

Spark is a performance analysis tool. On Paper 1.21+, it is usually integrated.

  • /spark health: shows CPU, memory, TPS, MSPT, and general status.
  • /spark tps: shows server TPS.
  • /spark profiler: starts a detailed analysis to detect which plugin, entity, or task is causing lag.
  • /spark profiler --timeout 60: runs a profile for 60 seconds.

How to interpret it:

  • 20 TPS: ideal performance.
  • 18 to 19 TPS: acceptable performance, but worth checking.
  • Below 18 TPS: lag is already noticeable.
  • MSPT below 50: the server processes ticks on time.
  • MSPT above 50: the server cannot maintain 20 TPS.

8.2 Timings

/timings on
/timings paste

What it does: generates a basic performance report for the server and plugins.

Recommendation: use Spark instead of Timings whenever possible, because Spark is usually more complete and precise.


9. Additional best practices

9.1 Pregenerate the world

Recommendation: use a plugin like Chunky.

/chunky radius 5000
/chunky start

What it does: generates chunks before players explore them.

Why: live world generation consumes a lot of CPU and disk I/O. Pregeneration reduces lag spikes when players travel.

9.2 Use worldborder

/worldborder set 10000

What it does: limits the size of the world.

Why: prevents infinite exploration, reduces storage usage, and makes pregeneration easier.

9.3 Avoid /reload

Not recommended:

/reload

Why: it can cause memory leaks, duplicated tasks, plugin errors, and unstable behavior.

Recommended option: fully restart the server from the panel.

9.4 Review plugins

Many performance issues do not come from hardware, but from poorly optimized plugins.

  • Remove plugins you do not use.
  • Avoid duplicate plugins that do the same thing.
  • Update plugins to versions compatible with your Minecraft version.
  • Review heavy databases, excessive logs, and protection plugins with many queries.

9.5 Control farms

Mob farms, villagers, hoppers, and redstone farms can heavily affect performance.

Recommendation: use area limits or plugins like FarmLimiter or FarmControl if the server has many players.


Recommended configuration summary

Parameter Recommended value Main reason
simulation-distance 4 to 6 Reduces entity, redstone, and crop processing.
view-distance 6 to 8 Balances visual experience and performance.
entity-broadcast-range-percentage 75 Reduces data sent to clients.
mob-spawn-range 4 Prevents spawns outside simulated areas.
nerf-spawner-mobs true Reduces AI for spawner mobs.
hopper-transfer and hopper-check 8 Reduces hopper checks.
max-entity-collisions 2 Reduces collision load.
treasure-maps enabled false Prevents spikes from structure searches.

Need help

If you have issues or questions, open a ticket from the billing.baires.host panel or contact our support team.

You can also reach us through our social media:

Was this answer helpful? 2 Users Found This Useful (2 Votes)