Rener
Rener

Mastering TPS: The Ultimate PaperMC Optimization Guide

Don't just install Paper. Learn to configure every parameter in the Bukkit-Spigot-Paper hierarchy to eliminate lag at its source.

If you're here, you already know that "Vanilla" Minecraft servers are inherently inefficient. PaperMC is the standard starting point for any serious administrator, but its default configuration is conservative to avoid breaking technical Redstone mechanics or farms.

Phase 1: The Heart (Java Flags)

Improperly configured Garbage Collection is the #1 cause of sudden lag spikes. Before the first player enters, your JVM must be tuned for stability. For modern versions (1.20.5+), Java 21 is the industry standard.

Startup Flags
java -Xms6G -Xmx6G -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 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper.jar nogui

II. Entity Optimization (bukkit.yml)

The Bukkit engine controls global limits. Reducing these values is the fastest way to recover MSPT (Milliseconds per Tick).

bukkit.yml
spawn-limits:
  monsters: 50
  animals: 8
  water-animals: 3
  ambient: 1

ticks-per:
  monster-spawns: 10

chunk-gc:
  period-in-ticks: 600

III. Performance Tweaks in spigot.yml

Here we manage how entities interact with the environment and limit unnecessary AI distance.

spigot.yml
world-settings:
  entity-activation-range:
    animals: 16
    monsters: 24
    raiders: 48
    misc: 8
  entity-tracking-range:
    players: 48
    animals: 48
    monsters: 48
  mob-spawn-range: 6
  merge-radius:
    item: 4.0
    exp: 6.0

IV. Advanced Paper Configuration (paper-world-defaults.yml)

Paper introduces fixes that Spigot doesn't even touch. These are the changes with the highest impact on modern server performance.

paper-world-defaults.yml
entities:
  spawning:
    despawn-ranges:
      soft: 28
      hard: 96
    per-player-mob-spawns: true
chunks:
  auto-save-interval: 6000
  max-auto-save-chunks-per-tick: 6
tick-rates:
  optimize-explosions: true
  update-pathfinding-on-block-update: false
  fix-climbing-bypass: true
  alt-item-despawn-rate:
    enabled: true
    items:
      cobblestone: 300
      netherrack: 300
      dirt: 300

V. The "Holy Grail" of Performance: Pre-generation

80% of lag on new servers comes from real-time terrain generation. When a player flies with Elytra into unexplored territory, the CPU collapses creating chunks.

Solution #1: Do not generate chunks manually while players are online.

To get the best possible performance, use worlds.renerverse.win. It's the #1 site for custom pre-generated worlds. Download a processed world, upload it to your server, and completely eliminate exploration lag.

VI. Network and Protocol (server.properties)

server.properties
view-distance: 6
simulation-distance: 4
network-compression-threshold: 256
use-native-transport: true

Conclusion: The Optimization Cycle

Optimization is not "set and forget." It's a continuous process of monitoring and adjustment. Implement these changes, restart, and use /spark sampler --timeout 60 to analyze live performance.