> Intel // field guide_

How to Fix Minecraft Server Lag: Troubleshooting Guide

By Matthew Zhao||Updated
MinecraftGuides

Minecraft server lag ruins multiplayer fast. One moment you're building a base, the next you're watching blocks reappear after you break them while mobs teleport around. If your Minecraft server is lagging, you're not alone, and you're not stuck with it.

Server lag comes in many forms, from chunk loading delays to entity-heavy farms. Most lag problems are fixable. This guide walks through the common causes and the fixes that work.

Understanding Minecraft Server Lag: TPS, MSPT, and Performance Metrics

Before changing anything, understand what you're measuring. Minecraft servers run on ticks, and the target is 20 ticks per second (TPS). When your server can't keep up with 20 TPS, players notice lag.

TPS (Ticks Per Second): The heartbeat of your server. 20 TPS is the maximum and the goal. The further it drops below 20, the more players notice delayed block updates, rubber-banding and slow mobs.

MSPT (Milliseconds Per Tick): How long each tick takes to process. At 20 TPS, the server has 50ms per tick. If MSPT stays above 50, the server can't keep up and TPS falls.

You can check TPS with /tps on Paper servers, or with /tick query on vanilla servers. For real diagnostics, use the spark profiler, which breaks down where your server spends its time.

How to Check Your Server's Performance

Step 1: Run the spark Profiler

spark is the standard profiler for Minecraft servers. Paper has bundled spark since 1.21 and recommends it over its old Timings system, which is deprecated and turned off by default (Paper docs). On Spigot, Forge, NeoForge or Fabric, install spark as a plugin or mod.

Run /spark profiler start, let the server run through a laggy period for a few minutes, then run /spark profiler stop. The report link shows which plugins, mods, entities or tasks are using tick time.

Step 2: Check Real-Time TPS

Use /tps (Paper), /spark tps (anywhere spark is installed) or /tick query (vanilla). Real data beats guessing every time.

Common Causes of Minecraft Server Lag

1. Chunk Loading and Generation Lag

Chunks are 16 by 16 block columns that run the full height of the world. When players explore new territory, your server must generate and load chunks. Generation is CPU-intensive and causes lag spikes.

Signs: Lag spikes when players explore new areas, not at spawn.

Fixes:

  • Pre-generate your world: Use a pre-generation plugin or mod such as Chunky to generate chunks ahead of time, ideally when nobody is online. This prevents generation lag during play.
  • Lower view distance: view-distance in server.properties defaults to 10. Lowering it means fewer chunks are sent to each player.
  • Adjust simulation distance: Separate from view distance, simulation-distance controls which chunks actually tick (mobs move, crops grow, redstone runs). It also defaults to 10, and lowering it reduces the work done every tick.

2. Entity Lag

Every mob, dropped item, and arrow takes processing power. Too many entities means lag.

Signs: Lag even when players aren't moving, especially around mob farms, animal pens or spawn.

Fixes:

  • Lower mob spawn limits: spawn-limits in bukkit.yml (and the spawning settings in Paper's world config) control how many mobs can exist per player.
  • Control farms: Ask players to cull overcrowded animal pens and keep mob farms from piling mobs into single chunks.
  • Tune hoppers: Large hopper chains and item sorters add up. spigot.yml and Paper's world config both have hopper settings that reduce their cost.
  • Check for item lag: Dropped items count as entities. Raising the item merge-radius in spigot.yml makes nearby items combine into fewer entities.

3. Plugin Overhead

Even well-written plugins consume resources. Many plugins add up.

Signs: Your spark report shows plugins taking significant tick time.

Fixes:

  • Audit your plugins: Remove anything you don't really need, and combine functionality where possible.
  • Update plugins: Old versions are often less efficient and may not be built for your server version.
  • Replace heavy plugins: If spark shows one plugin taking a large share of tick time, look for a lighter alternative that covers the same job.

4. Redstone and Contraptions

Complex redstone clocks and automatic farms can cause heavy lag.

Signs: Lag spikes in specific areas with redstone.

Fixes:

  • Use slower clocks: Avoid very fast clocks when a slower one does the job.
  • Switch off idle contraptions: Add switches so farms only run when someone needs them.
  • Watch piston-heavy builds: Flying machines, large piston doors and big item sorters are common lag sources.

5. World Corruption or Issues

Corrupted chunks or broken world data can cause lag and crashes.

Signs: Consistent lag or errors in one specific area, and error messages in the logs.

Fixes:

  • Find the bad chunks: Server logs often print the chunk coordinates. A tool like MCA Selector lets you inspect region files.
  • Delete bad chunks: As a last resort (and after a backup), delete the corrupted chunks so they regenerate.

Advanced Server Optimization: JVM Flags and Configuration

Once you've found the lag sources, tune how Java runs the server. JVM (Java Virtual Machine) flags control memory and garbage collection.

Aikar's Flags: The Common Starting Point

Aikar's flags are the most widely used JVM flags for Minecraft servers. This is the set from PaperMC's documentation, shown with 10GB of memory:

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

What the main flags do:

  • -Xms10G -Xmx10G: Sets the starting and maximum heap to the same size. Change 10G to match the memory you're giving the server.
  • -XX:+UseG1GC: Uses the G1 garbage collector.
  • -XX:MaxGCPauseMillis=200: Asks G1 to aim for short garbage collection pauses.
  • The other flags tune how G1 sizes and cleans memory for Minecraft's allocation pattern.

Many hosting panels set the memory flags for you based on your plan, so check your panel before editing the startup command.

Proper Memory Allocation

Never give Minecraft every byte of RAM on the machine. Java needs memory beyond the heap, and so does the operating system. Paper's docs suggest setting -Xmx roughly 1000 to 1500MB below the machine's total memory. Overallocating forces the system to swap memory to disk, which hurts performance badly.

More RAM also isn't a cure-all. Past what your server actually uses, extra memory doesn't make ticks faster.

Paper Server Optimizations

If you run a plugin server, switch from vanilla or Spigot to Paper. Paper includes many performance improvements over vanilla and exposes extra settings in config/paper-global.yml and config/paper-world-defaults.yml, covering things like entity behavior, hoppers and redstone. Read the Paper configuration docs before changing values, since some options change gameplay.

Paper runs plugins, not mods. For Forge, NeoForge or Fabric servers, see the modded section in the FAQ below.

Optimization Settings: Fine-Tuning server.properties

Your server.properties file controls several performance factors:

Setting Suggestion Why
view-distance Below the default of 10 if chunk sending is a problem Reduces chunks sent to each player
simulation-distance Below the default of 10 if tick time is high Limits how many chunks are actively ticked
max-players What your hardware can handle More players means more chunks and entities
network-compression-threshold 256 (the default) Packets above this size get compressed
online-mode true Keep this on for security

Change one setting at a time and check TPS after each change, so you know what helped.

Monitoring and Maintenance for Long-Term Performance

Lag doesn't always appear overnight. Sometimes it creeps up as your world grows.

Regular Monitoring

  • Check TPS and MSPT during peak hours
  • Run a spark profile when anything feels off, and after adding plugins or mods
  • Watch RAM usage over time, since steady growth between restarts can point to a memory leak
  • Read your server logs for repeated errors

World Maintenance

  • Clean up old builds: Abandoned farms and contraptions near spawn or busy areas keep costing tick time.
  • Trim unused chunks: A tool like MCA Selector can delete chunks players have barely visited, which shrinks the world on disk.
  • Manage backups: Keep enough backups to recover from mistakes, and remove old ones you'll never restore.

Player Communication

Tell players how they can help:

  • Switch off contraptions when not in use
  • Avoid leaving piles of dropped items
  • Report lag with /tps readings and their location, not just complaints

Upgrading Your Hosting: When It's Time

Sometimes lag isn't your configuration, it's your hardware. If you've optimized everything and lag persists, the server may simply need more CPU or RAM.

Look for:

  • Strong single-thread CPU performance: The main server tick runs mostly on one thread, so per-core speed matters a lot.
  • NVMe storage: Fast storage helps with chunk loading and saving.
  • Clear resource allocations: Know how much RAM and CPU your plan actually includes.
  • Responsive support: When something goes wrong, you need help quickly.

FAQ: Common Questions About Minecraft Server Lag

Why is my Minecraft server lagging when I'm the only one online?

If lag happens with one player, it's usually chunk generation, a misbehaving plugin or mod, a busy farm, or world issues. Run a spark profile to find out which.

How do I check server TPS?

On Paper servers, run /tps. On vanilla, run /tick query for the current tick rate and tick times, or /debug start and /debug stop for a profiling report. With spark installed, /spark tps works on any server type.

What causes chunk lag specifically?

Chunk generation, chunk loading, and chunks full of entities or redstone. Pre-generate the world to avoid generation during play, and lower simulation-distance to reduce how many chunks are ticked.

How do I optimize performance for modded servers?

Modded servers are harder to optimize because each mod adds work. Use sensible JVM flags, profile with the spark mod, and add server-side performance mods built for your loader, such as Lithium, FerriteCore or ModernFix (check each mod's page for supported loaders and versions). Remove mods that show up as heavy in profiles.

What JVM flags should I use?

Aikar's flags are a good starting point for most servers. Set -Xms and -Xmx to the memory you're giving the server, leaving headroom for the operating system. Don't add flags you don't understand, since wrong settings can cause lag or stop the server from starting.

Can I reduce lag by lowering the difficulty?

Usually only a little. Focus on the big three first: view and simulation distance, entity count, and plugins or mods.

Is a VPS good enough for a Minecraft server?

It can be, if it has strong per-core CPU performance and enough RAM. Some VPS plans share CPU with other customers, which can cause lag when neighbors are busy. Check what CPU and RAM you're actually getting.

Putting It All Together: Your Optimization Checklist

  1. Diagnose: Check TPS and run a spark profile to find the lag source
  2. Configure: Lower view-distance and simulation-distance; set max-players sensibly
  3. Optimize plugins or mods: Audit, update, and remove what you don't need
  4. Apply JVM flags: Use Aikar's flags sized to your memory
  5. Use Paper: For plugin servers, run Paper instead of vanilla or Spigot
  6. Monitor: Check TPS regularly and profile after changes
  7. Upgrade if needed: If lag persists after optimization, consider more CPU or RAM

Minecraft server lag is frustrating, but it's usually solvable. A lot of lag comes from configuration, farms and plugins rather than raw hardware. Profile first, then make targeted changes.

Minecraft Server Hosting With EZ Game Host

If you've optimized everything and need more headroom, EZ Game Host offers Minecraft server hosting with Paper, Spigot, Forge and Fabric support, NVMe storage on every plan, and 24/7 support. Plans start at $12/month (4GB RAM, 1 thread) and go up to $48/month (16GB RAM, 4 threads). See the Minecraft plans for full allocations.

For more reading, see our guide to comparing Minecraft server hosts, our modded Minecraft hosting guide, or learn how to host a Minecraft server on your PC.

We use cookies for analytics, ad measurement and session recordings. Accept to allow them, or Decline to opt out of analytics and the sale or sharing of your personal information. Privacy Policy