Skip to content

Minecraft Server Performance Optimization

Complete guide to optimizing your Minecraft server performance. Covers Paper tuning, view distance, pre-generation, Aikar's flags, and lag diagnostics.

HostedGG Team
Author · Updated
Verifiedfor Current version
Checked by HostedGG Team on Jun 19, 2026
Updated 4 months agoHostedGG Team

Minecraft Server Performance

A smooth server means happy players. This guide covers everything from choosing the right server software to diagnosing and fixing lag on your Minecraft server.

Understanding Server Performance

TPS (Ticks Per Second)

Minecraft runs at 20 TPS (ticks per second). Each tick handles mob AI, block updates, player actions, and world simulation. When TPS drops below 20, the server lags.

TPSExperience
20✅ Perfect — no noticeable lag
18-19🟢 Good — very minor delays
15-17🟡 Acceptable — slight delays in mob AI
10-14🔴 Bad — noticeable block placement delay
Below 10⛔ Unplayable — severe lag

MSPT (Milliseconds Per Tick)

Each tick must complete within 50ms (1000ms ÷ 20 TPS = 50ms). If a tick takes longer, TPS drops.

MSPTTPSStatus
Under 50ms20✅ Healthy
50-100ms10-20🟡 Degraded
Over 100msUnder 10🔴 Critical

Quick Wins (Do These First)

1. Use Paper Instead of Vanilla

Paper is a drop-in replacement for vanilla Minecraft with massive performance improvements. It optimizes:

  • Chunk loading and generation
  • Entity AI processing
  • Hopper mechanics
  • Redstone calculations
  • TNT physics

Switching from vanilla to Paper alone can improve TPS by 30-50%.

2. Set Proper View Distance

View distance controls how many chunks are loaded around each player. Lower = better performance.

View DistanceLoaded Chunks (per player)Recommended For
6169Large servers (20+ players)
8289Medium servers (10-20 players)
10441Small servers (5-10 players)
12+625+Very small or well-resourced servers

Set in your Settings tab or in server.properties:

properties
view-distance=8
Intel

Tip: Paper also has simulation-distance which controls how far entities (mobs, hoppers) are active. Set it 2-4 chunks lower than view distance.

3. Pre-generate Chunks with Chunky

Chunk generation is the biggest source of lag spikes. Pre-generate your world border area to eliminate this:

  1. Install the Chunky plugin
  2. Set a world border: /worldborder set 10000
  3. Start pre-generation: /chunky start
  4. Wait for completion (may take hours for large worlds)

After pre-generation, chunk loading becomes nearly instant.

4. Aikar's Flags (Pre-configured)

All HostedGG servers use Aikar's optimized JVM flags by default. These flags tune Java's garbage collector to minimize lag spikes caused by memory management.

You don't need to configure these — they're already applied to your server.

Paper-Specific Optimization

paper-world-defaults.yml

Key settings to tune in Paper's config:

yaml
# Reduce mob spawn rates (biggest performance impact)
spawn-limits:
  monster: 50       # default: 70
  animal: 8         # default: 10
  water-animal: 3   # default: 5
  ambient: 1        # default: 15

# Despawn mobs faster
despawn-ranges:
  monster:
    soft: 28       # start random despawn
    hard: 96       # force despawn

# Reduce entity activation range
entity-activation-range:
  animals: 16
  monsters: 24
  misc: 8

# Optimize hoppers (huge impact on redstone-heavy servers)
hopper:
  disable-move-event: true
  ignore-occluding-block: true

paper-global.yml

yaml
# Async chunk loading (already enabled on Paper)
chunk-system:
  gen-parallelism: default
  io-threads: default
  worker-threads: default

Identifying Lag Sources

Spark is the best profiler for Minecraft servers:

  1. Install Spark plugin
  2. Run /spark profiler start
  3. Play normally for 5-10 minutes
  4. Run /spark profiler stop
  5. Open the generated link to see what's consuming tick time

Common Lag Sources

SourceSymptomsFix
Chunk generationSpikes when exploringPre-generate with Chunky
Too many entitiesGradual TPS decline, mob farmsReduce spawn limits, add kill timers
Hopper chainsLag near farms/storageUse disable-move-event: true
Redstone machinesLag near large buildsLimit redstone clock speed
Plugin errorsError spam in consoleUpdate or remove broken plugins
Too many playersConsistent low TPSUpgrade plan or reduce view distance
Large world filesLong save timesSet world border, prune unused chunks

Using Timings

Paper includes a built-in profiler:

  1. Run /timings on
  2. Wait 10 minutes during normal gameplay
  3. Run /timings paste
  4. Open the generated link
  5. Look for the highest tick percentages

Plan Sizing Guide

Server TypePlayersRecommended RAMPlan
Vanilla SMP1-52 GBStarter
Plugin server with EssentialsX5-154 GBStandard
Semi-vanilla with 10+ plugins15-256 GBPremium
Large network / heavy plugins25-408 GBUltimate
Light Fabric mods2-102-4 GBStarter/Standard
Forge modpack (light)2-54 GBStandard
Forge modpack (heavy, ATM/RLCraft)5-206-8 GBPremium/Ultimate

When to Upgrade

  • TPS consistently below 18 after optimization
  • RAM usage above 85% during normal play
  • Frequent garbage collection pauses visible in Spark reports
  • Player complaints about persistent lag

Entity Management

Entities (mobs, items, minecarts, armor stands) are the biggest ongoing performance cost.

Limiting Mob Spawns

Edit Paper's spawn limits (see above) or use plugins:

  • ClearLagg — Automatically removes excess entities
  • MobLimiter — Per-chunk mob caps

Reducing Item Drops

yaml
# In paper-world-defaults.yml
# Items despawn faster
alt-item-despawn-rate:
  enabled: true
  items:
    cobblestone: 300    # 15 seconds (default: 6000 = 5 min)
    netherrack: 300
    sand: 300
    gravel: 300
    dirt: 300

Farm Optimization

Large mob farms and redstone farms cause the most lag:

  1. Limit mob farm rates — Don't make infinite spawners
  2. Use water-based collection instead of hoppers
  3. Add item merging — Paper has this built-in
  4. Cap redstone clocks — Fastest viable clock speed, not fastest possible

World Management for Performance

Set a World Border

Unbounded worlds grow forever, increasing file size and backup time:

sh
/worldborder set 20000

This limits the world to 10,000 blocks in each direction from spawn — plenty for most servers.

Trim Unused Chunks

If your world is already large, use Chunky to trim chunks outside the world border:

sh
/chunky trim

Emergency: Server Is Lagging Badly

Quick recovery steps:

  1. Restart the server — Clears memory, resets entity cache
  2. Check console for error spam
  3. Kill excess entities: /kill @e[type=!player] (⚠️ kills all mobs)
  4. Reduce view distance temporarily to 4-6
  5. Disable the newest plugin you installed
  6. Run Spark profiler to identify the cause

Next Steps

Related Articles

Help verify this page

Tested this recently? Send a quick accuracy signal for editors.

Sign in to report accuracy

Help improve HostedGG

Know this game? Join our community of contributors.

Discussion

Sign in to join the discussion.

Loading discussion...