LEVEL 2Performance

Performance and lag

Read TPS and MSPT, profile with spark, then fix the actual bottleneck.

About 18 minEasyReviewed Aug 18, 2026
On this pageMy server is laggingTPS and MSPT in plain languageA useful order of checksWhat each resource changesProfile with sparkCommon causes and fixesRAM and garbage collectionView versus simulation distanceWorld generationPerformance mods and plugins

My server is lagging#

Start with the symptom:

  • Blocks/mobs freeze for everyone: check TPS/MSPT and the main server thread.
  • One player rubber-bands: check that player’s latency, Wi-Fi and route.
  • Exploration causes spikes: watch chunk generation and consider pregeneration.
  • Pauses during saves/backups: inspect disk speed, free space and backup timing.
  • Started after an update: compare versions and roll back one layer using the backup.

TPS and MSPT in plain language#

Minecraft aims for 20 TPS—twenty game ticks each second. One tick has a 50 ms budget. MSPT is the time the server spends calculating a tick. Below 50 ms usually keeps 20 TPS; sustained values above 50 force the game to slow.

High network ping delays a player’s messages but does not automatically lower TPS. Low TPS affects everyone’s mobs, blocks and redstone. Diagnose the kind of lag before changing settings.

A useful order of checks#

  1. 1
    Ask whether every player is affected and whether movement or game logic is slow.
  2. 2
    Check TPS/MSPT with a compatible monitoring mod or Crafty metric.
  3. 3
    Look at RAM without assuming “100% allocated” means out-of-memory.
  4. 4
    Check per-core CPU use and temperature; overall CPU can look low while one core is full.
  5. 5
    Watch disk activity and free space.
  6. 6
    Remove or roll back newly added mods after a backup.
  7. 7
    Reduce simulation-distance, then view-distance.
  8. 8
    Pregenerate a bounded world so exploration is not creating chunks live.
  9. 9
    Inspect huge farms, item piles, villagers, chunk loaders and redstone.
  10. 10
    Make a backup, then restart normally and compare.

What each resource changes#

CPU single-core speed limits tick work. RAM holds loaded chunks and mod data, but allocating all system memory starves ZimaOS and file cache. SSD speed helps saves, backups and chunk reads. Entity count, farms and redstone increase tick work. Upload and routing affect outside players’ latency.

Profile with spark#

spark ↗ is a profiler available for several Minecraft platforms. It records where server time is actually spent and can produce a shareable report.

  1. 1
    On current Paper releases, use the bundled spark profiler. On Fabric, NeoForge, Forge or an older supported platform, install the matching official spark build only if it is not already included.
  2. 2
    Reproduce the lag during normal play.
  3. 3
    Start a profiler using the command in spark’s current documentation.
  4. 4
    Let it capture the problem—not an idle server.
  5. 5
    Stop it and open the generated report privately first.
  6. 6
    Look for the largest tick-time branches: entities, chunks, a plugin/mod or world task.
  7. 7
    Change one cause, then capture the same scenario again.

Profiler links can include server/plugin information. Review before posting publicly.

Common causes and fixes#

CauseEvidenceFirst measured change
Live chunk generationSpikes when players explorePregenerate a bounded area
Too many active chunksMSPT rises with spread-out playersLower simulation distance
Entity-heavy farmsEntity ticking dominates profileLimit or redesign the specific farm
RedstoneBlock/entity tick branch is highInspect active contraptions
Plugin/mod taskNamed code dominates profileUpdate, configure or remove that component
Slow storageSaves/backups stall; high disk waitMove active world to SSD and reschedule backups
Thermal throttlingCPU clock drops under loadClean cooling and check temperature
Memory pressureOS swaps or process is killedReduce heap/workload or add system RAM

RAM and garbage collection#

Allocate enough for the workload but leave headroom for the OS, Crafty, containers and file cache. A huge heap can make garbage collection less frequent but longer and can encourage plugins/mods to retain more data. “Free RAM” inside Java is not automatically wasted.

View versus simulation distance#

View distance controls how far chunks are sent/kept for viewing. Simulation distance controls how far game logic remains active. Lower simulation distance often reduces tick work more directly. Change in small steps and tell players.

World generation#

Generating terrain is CPU and storage intensive. Pregeneration moves much of that work to a planned window and creates a known storage footprint. Set a world border first; an unlimited pregen is not a plan.

Performance mods and plugins#

Paper already includes many optimizations. Fabric offers projects such as Lithium, FerriteCore, Krypton, ServerCore and Alternate Current, but compatibility varies by exact Minecraft release and with each other. Verify official project metadata and change a few at a time.

Avoid automatic “lag clear” tools that regularly delete entities without identifying the cause. They can hide symptoms and surprise players.