Find a good minecraft server

Minecraft Server Performance Optimization Guide

Eliminate lag and optimize your Minecraft server to handle hundreds of players with smooth, stable performance

Server performance is the foundation of a great player experience. Even the best-designed server with amazing features will struggle to retain players if lag, freezes, and crashes are frequent. This comprehensive guide covers everything you need to know about Minecraft server optimization, from hardware selection to advanced configuration tweaks.

Whether you're running a small survival server for friends or a large network with hundreds of concurrent players, these proven optimization techniques will help you maintain smooth performance and happy players.

Understanding Server Performance Metrics

Before optimizing, you need to understand what to measure and what causes performance issues:

Key Performance Indicators

TPS (Ticks Per Second)

Target: 20 TPS. This is the gold standard. Below 18 TPS, players experience noticeable lag.

MSPT (Milliseconds Per Tick)

Target: Under 50ms. Each tick should complete in under 50ms to maintain 20 TPS.

RAM Usage

Monitor heap usage. Constant 100% usage causes frequent garbage collection and lag spikes.

CPU Usage

Minecraft is single-threaded for world ticking. High CPU usage on one core indicates bottlenecks.

Common Misconception: Adding more RAM doesn't always improve performance. Too much RAM can actually cause longer garbage collection pauses. The key is finding the right balance for your player count and plugins.

Hardware & Hosting Considerations

Your server's foundation starts with good hardware. Here's what matters most for Minecraft:

CPU: The Most Critical Component

Minecraft server performance is primarily CPU-bound, and specifically single-threaded performance matters most:

  • Clock Speed Over Cores: A CPU with 3.5+ GHz on a single core will outperform a 16-core CPU at 2.0 GHz
  • Recommended: Intel i7/i9 or AMD Ryzen 5/7 with high boost clocks (4.0+ GHz)
  • Budget Option: AMD Ryzen 5 5600X or Intel i5-12400 offer excellent performance for the price
  • Premium Option: Intel i9-13900K or AMD Ryzen 9 7950X for large networks

RAM Requirements

  • Vanilla, 1-10 players: 2-4GB
  • Vanilla, 10-25 players: 4-6GB
  • Modded/Heavy Plugins, 10-25 players: 6-8GB
  • 50-100 players: 8-12GB
  • 100+ players: 12-16GB+

Pro Tip: Use DDR4-3200 or faster RAM. While Minecraft can't directly utilize the speed difference, faster RAM helps with overall system responsiveness, especially when running multiple world threads or proxy services.

Storage: SSD is Mandatory

Never run a Minecraft server on a traditional HDD in 2025:

  • Minimum: SATA SSD (500+ MB/s read/write)
  • Recommended: NVMe SSD (2000+ MB/s read/write)
  • Why it matters: World chunks, plugin data, and player files are constantly read/written. Fast storage prevents stuttering during chunk loading and world saves

Choosing the Right Server Software

Your choice of server software significantly impacts performance. Here's a breakdown of popular options:

Paper

Best all-around choice. High performance with extensive optimization patches and full plugin compatibility. Recommended for 90% of servers.

Purpur

Fork of Paper with extra configuration options and gameplay tweaks. Great if you want more control over mechanics.

Fabric

Lightweight mod loader with excellent performance. Best for modded servers, but requires specific mods instead of plugins.

Vanilla/Spigot

Avoid for production. Vanilla lacks optimization, and Spigot is outdated compared to Paper. No good reason to use these in 2025.

JVM Optimization & Startup Flags

Java Virtual Machine (JVM) flags can dramatically improve performance through better memory management:

Recommended Startup Flags (Aikar's Flags)

These proven flags work well for most servers running Paper with 8-12GB RAM:

java -Xms10G -Xmx10G -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

Flag Explanation

  • -Xms and -Xmx: Set to the same value (your allocated RAM) to prevent heap resizing
  • -XX:+UseG1GC: Use G1 garbage collector, optimized for low-latency applications
  • -XX:MaxGCPauseMillis=200: Target maximum pause time for garbage collection
  • -XX:+AlwaysPreTouch: Pre-allocate memory on startup to prevent mid-game allocation lag

Important: Adjust -Xms and -Xmx based on your available RAM. Leave 1-2GB for the operating system. For a server with 16GB total RAM, use -Xms14G -Xmx14G.

World & Entity Optimization

The game world itself is often the biggest performance drain. Here's how to optimize it:

View Distance Configuration

View distance is one of the biggest performance factors. Edit server.properties and Paper's config:

# server.properties view-distance=8 simulation-distance=6 # paper-world-defaults.yml chunks: delay-chunk-unloads-by: 10s max-auto-save-chunks-per-tick: 8 prevent-moving-into-unloaded-chunks: true
  • view-distance=8: Good balance for most servers. Players can see 8 chunks in each direction
  • simulation-distance=6: Entities and crops only update within 6 chunks of players, saving CPU
  • Smaller is better: Each reduction in view distance significantly improves performance

Entity Management

Too many entities (mobs, items, armor stands) cause severe lag. Configure limits in Paper:

# paper-world-defaults.yml entities: spawning: per-player-mob-spawns: true spawn-limits: monster: 50 creature: 10 ambient: 15 axolotls: 5 water_creature: 5 water_ambient: 20 behavior: disable-chest-cat-detection: true nerf-pigmen-from-nether-portals: true

Redstone Optimization

  • Limit Large Redstone Clocks: Use plugins like WorldGuard to restrict complex redstone in certain areas
  • Disable Redstone in Unloaded Chunks: Configure Paper to stop redstone when chunks unload
  • Monitor Problematic Builds: Use /timings to identify lag-causing contraptions

Plugin Optimization Best Practices

Poorly configured or excessive plugins are a leading cause of server lag:

Plugin Selection Strategy

  • Quality Over Quantity: 10 well-optimized plugins beat 50 mediocre ones
  • Check Update Dates: Avoid plugins not updated in 6+ months, they may have performance issues
  • Read Reviews: Look for comments about performance and resource usage
  • Test Before Production: Always test new plugins on a development server first

Known Performance-Heavy Plugins

Be Cautious With:

  • Poorly configured permission plugins (large permission files, frequent checks)
  • Anti-cheat plugins (necessary but resource-intensive, choose wisely)
  • Shop plugins with frequent database queries
  • Hologram plugins with hundreds of holograms
  • Any plugin running tasks every tick (every 50ms)

Optimize Existing Plugins

  • Reduce Task Frequencies: Change tasks from running every tick to every 20 ticks (1 second) when possible
  • Database Connection Pooling: Configure plugins to reuse database connections instead of creating new ones
  • Cache Frequently-Accessed Data: Many plugins offer caching options in their configs
  • Disable Unused Features: Turn off features you're not using to save resources

Monitoring & Troubleshooting Performance

You can't optimize what you can't measure. Use these tools to identify performance bottlenecks:

Built-in Monitoring Commands

# Check current TPS and memory usage /tps # Generate detailed performance report /timings on /timings paste # Monitor specific plugin performance /spark profiler start /spark profiler stop

Reading Timings Reports

Timings reports show exactly what's consuming server resources:

  • Look for Red Percentages: Anything using over 10% of a tick is a concern
  • Entity Ticking: High entity tick time? Too many mobs or items on the ground
  • Tile Entity Ticking: Many hoppers, furnaces, or complex redstone?
  • Plugin Tasks: Identify which plugins are running expensive operations

External Monitoring Tools

  • Spark: Advanced profiler plugin with CPU and memory flame graphs
  • Plan: Player analytics and server statistics dashboard
  • Grafana + Prometheus: Professional monitoring for large networks

Performance Checklist: Run this weekly to maintain optimal performance:

  1. Check timings report for new performance issues
  2. Review and clear old player data files
  3. Restart server to clear memory leaks (every 24-48 hours)
  4. Update Paper/Purpur to latest version
  5. Review plugin list and remove unused ones
  6. Backup and optimize world files

Common Performance Issues & Solutions

Issue: Lag Spikes Every Few Seconds

Cause: Garbage collection pauses

Solution: Adjust JVM flags, particularly -XX:MaxGCPauseMillis, or reduce allocated RAM

Issue: TPS Drops When Players Explore New Chunks

Cause: Chunk generation is CPU-intensive

Solution: Pre-generate world chunks using Chunky plugin before server launch

Issue: Gradual TPS Degradation Over Hours

Cause: Memory leak in a plugin or too many entities accumulating

Solution: Identify leaking plugin via timings, implement regular entity clear tasks, schedule automatic restarts

Issue: High MSPT But Low TPS

Cause: Single-threaded bottleneck (world ticking can't keep up)

Solution: Reduce view distance, decrease entity limits, optimize plugins, upgrade CPU

Conclusion: Performance is an Ongoing Process

Optimizing a Minecraft server isn't a one-time task, it's an ongoing commitment to monitoring, testing, and refining. Start with the fundamentals: good hardware, Paper or Purpur software, proper JVM flags, and reasonable view distances.

Then maintain performance through regular monitoring with timings reports, careful plugin selection, and periodic cleanup of worlds and entities. Remember that every server is unique, what works perfectly for a vanilla survival server might not apply to a heavily modded network.

The key is to measure, identify bottlenecks, make targeted changes, and measure again. With the techniques in this guide, you'll be well-equipped to run a smooth, lag-free server that keeps players happy and engaged.

Running a Lag-Free Server?

Showcase your optimized server and attract players who value smooth performance