Entity lag occurs when too many entities (mobs, items, minecarts, etc.) are loaded in your Minecraft world, causing the server to slow down or experience TPS (ticks per second) drops. This guide shows you how to reduce entity lag by configuring server settings and managing entities effectively.
Understanding Entity Lag
Entities include:
- Mobs: Animals, monsters, and villagers
- Items: Dropped items on the ground
- Projectiles: Arrows, snowballs, and other thrown items
- Vehicles: Minecarts, boats
- Other: Armor stands, item frames, paintings
When hundreds or thousands of entities are loaded simultaneously, your server's CPU struggles to process their AI, movement, and interactions, resulting in lag.
Using Plugins to Manage Entities
For more advanced entity management, consider installing plugins:
ClearLag (Paper/Spigot/Bukkit):
- Automatically removes dropped items, arrows, and other entities on a schedule
- Download from SpigotMC
- Configurable timers and entity types
- Warns players before clearing items
Entity Manager (Paper/Spigot/Bukkit):
- Limits specific entity types per chunk
- Prevents entity farms from causing lag
- Download from SpigotMC
Installation steps:
- Stop your server
- Download the plugin JAR file
- Click Files → Navigate to plugins folder
- Click Upload Files and select the plugin
- Start your server
Identifying Entity Lag Sources
To find areas with excessive entities, use these commands:
In-game commands (requires OP):
/minecraft:kill @e[type=item]- Remove all dropped items/minecraft:kill @e[type=arrow]- Remove all arrows/minecraft:kill @e[type=!player]- Remove all entities except players (use with caution!)
Check entity counts per world:
Most server implementations show entity counts in the /tps or /timings command output (requires plugins like Essentials or Paper's built-in commands).
Best Practices to Prevent Entity Lag
Follow these guidelines to maintain good server performance:
- Regular item clearing: Use ClearLag or similar plugins to remove dropped items every 5-10 minutes
- Limit mob farms: Ensure players don't build excessive mob grinders with hundreds of entities
- Remove unnecessary entities: Periodically check for entity buildup in loaded chunks
- Use hoppers wisely: Excessive hoppers checking for items can cause additional lag
- Avoid entity cramming: Large numbers of entities in small spaces cause both entity lag and collision lag
- Set view distance appropriately: Lower view distance means fewer chunks loaded and fewer entities active
Recommended Entity Limit Settings
Based on server size, here are recommended spawn limit values:
Small servers (5-10 players):
- Animals: 8, Monsters: 50, NPCs: 8, Water animals: 3, Ambient: 10
Medium servers (10-30 players):
- Animals: 6, Monsters: 40, NPCs: 6, Water animals: 3, Ambient: 8
Large servers (30+ players):
- Animals: 5, Monsters: 35, NPCs: 5, Water animals: 2, Ambient: 5
These are starting points - adjust based on your server's performance and player feedback.
Troubleshooting
- Server still lagging after reducing limits. Entity limits only affect new spawns. Use
/minecraft:killcommands to remove existing entities, or install ClearLag to automatically clean up. - Players complaining about no mobs. You may have set limits too low. Gradually increase spawn limits until you find a balance between performance and gameplay.
- ClearLag not working. Verify the plugin is in the plugins folder and check the console for errors. Configure the plugin's settings in
plugins/ClearLag/config.yml. - Specific areas causing lag. Use plugins like Spark or Timings to identify chunks with high entity counts. Visit those areas and manually clear entities or ask players to reduce their mob farms.
- Lag returns quickly after clearing. This indicates an entity farm or spawner is generating entities too quickly. Locate and disable or limit the source.
Reducing entity lag on your Minecraft server improves performance and provides a smoother experience for all players. Adjust spawn limits in your server settings, use plugins like ClearLag for automatic maintenance, and follow best practices to prevent entity buildup.

Minecraft