---
title: "Optimizing a Paper or Spigot Minecraft Server"
description: "Tune mob spawning, speed up world saves, and pick the right view distance for a smooth vanilla or plugin-based survival server, plus how to tell a config problem from a hardware problem."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.vaelix.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Optimizing a Paper or Spigot Minecraft Server

How do you optimize a Paper or Spigot Minecraft server? Pre-generate your world, lower view and simulation distance, tune spawn limits and entity activation range, and reduce `max-auto-save-chunks-per-tick`. Use Aikar's JVM flags, then profile with Spark to confirm what's actually costing tick time before changing anything else.

## Work out which kind of lag you actually have

"Lag" is three different problems. **TPS** is your server's own speed, the only one you control. **Ping** is network latency. **FPS** is the player's own PC, unrelated to your server.

Rubber-banding points to **ping**. Choppy visuals point to **their PC**. Frozen mobs and slow block breaks point to **TPS**, which is what this guide covers.

> **Tip:** Healthy TPS sits at **19.9–20.0**. Below **18** consistently, players notice.

## Pre-generate your world before you open the gates

Generating new terrain live is expensive; loading existing chunks is cheap. Pre-generate with **Chunky**, then set a **world border** so players can't trigger new generation by wandering off.

## View distance and simulation distance are your biggest levers

**View distance** and **simulation distance** (added in 1.18) scale roughly with distance squared, so small drops recover a lot of performance. Try 6 to 8 for `view-distance` and 5 to 7 for `simulation-distance`.

| Setting | File | Default | Recommended |
|---|---|---|---|
| `view-distance` | `server.properties` | 10 | 6–8 |
| `simulation-distance` | `server.properties` | 10 | 5–7 |

## Tune how many mobs exist, and how far away they still matter

**Spawn limits** cap how many mobs exist. **Entity activation range** controls how far away they're still fully simulated versus mostly dormant.

Leave **villagers** near default. Aggressive limits quietly break iron farms and trading halls.

| Setting | File | Default | Recommended |
|---|---|---|---|
| `spawn-limits.monsters` | `bukkit.yml` | 70 | 50 |
| `spawn-limits.animals` | `bukkit.yml` | 10 | 8 |
| `ticks-per.monster-spawns` | `bukkit.yml` | 1 | 5 |
| `entity-activation-range.animals` | `spigot.yml` | 32 | 16 |
| `entity-activation-range.monsters` | `spigot.yml` | 32 | 24 |
| `entity-activation-range.misc` | `spigot.yml` | 16 | 8 |

> **Tip:** Paper's own settings moved from `paper.yml` to `config/paper-world-defaults.yml` in 1.19. Search your panel's config editor for the key if it's not where you expect.

## Stop world saves from causing a stutter every few minutes

That periodic stutter is usually **autosave**. Modern Paper only saves changed chunks, but the number of chunks saved **per tick** is still tunable. Lower it to spread the load.

Never disable autosave, and never rely on `/save-all` on a timer instead.

| Setting | File | Default | Recommended |
|---|---|---|---|
| `max-auto-save-chunks-per-tick` | `paper-world-defaults.yml` | 24 | 6–8 |

## A handful of small settings that add up

None alone is huge, but stacked together on a populated server they add up. A bigger **merge radius** means fewer dropped-item entities. Suppressing the **hopper move-item event** removes a notorious farm-lag source, though it breaks plugins that listen for that event. Alternative redstone implementations can change how some contraptions behave, so test your farms first.

| Setting | File | Default | Recommended |
|---|---|---|---|
| `merge-radius.item` | `spigot.yml` | 2.5 | 4.0 |
| `merge-radius.exp` | `spigot.yml` | 3.0 | 6.0 |
| `hopper.disable-move-event` | `paper-world-defaults.yml` | false | true |
| `misc.redstone-implementation` | `paper-world-defaults.yml` | VANILLA | EIGENCRAFT |

## Use proper JVM flags, not just more RAM

Same as modded servers: the default garbage collector isn't tuned for Minecraft. Use **Aikar's flags**.

```text
-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
```

## Profile before you tune blind

Every setting above is a starting point, not a guarantee. Install **Spark** (the modern successor to Timings) and profile a live session to see exactly what's costing you tick time.

## Frequently asked questions

### What view distance should I use on a Paper server?

Try 6 to 8 for `view-distance` and 5 to 7 for `simulation-distance` in `server.properties`. Both scale roughly with distance squared, so small drops recover a lot of performance.

### Why does my Minecraft server stutter every few minutes?

That periodic stutter is usually autosave. Lowering `max-auto-save-chunks-per-tick` from its default of 24 to around 6 to 8 spreads the load. Never disable autosave.

### Should I lower mob spawn limits on a Paper server?

Moderately. Dropping monsters from 70 to 50 and animals from 10 to 8 helps, but leave villagers near default, because aggressive limits quietly break iron farms and trading halls.

Source: https://docs.vaelix.cloud/minecraft/optimizing-paper-spigot-minecraft/index.mdx
