Fixing Terraria server lag requires fine-tuning spawn rates, choosing an optimal world size, and maintaining plugin hygiene. This guide provides actionable settings, tables via your Hugo protable shortcode, and hands-on recommendations to keep your server running smoothly.
Sizing Summary
- Spawn Rates & Caps: Surface 0.5, Underground 0.3, Dungeon 0.2 with respective entity caps.
- World Size: Use Medium for 5-10 players; Large and Journey worlds demand robust hardware.
- Plugins: Audit high-impact plugins (WorldEdit, MagicStorage) and configure spawn/event throttling.
Spawn Rate Settings
Recommended Terraria Spawn Settings| Area Type | Spawn Rate | Entity Cap | Notes |
|---|
| Surface (Daytime) | 0.5 | 200 | Reduce daytime surface spawns to limit NPC overlap |
| Underground | 0.3 | 150 | Cap underground spawn to prevent sidebar lag |
| Dungeon/Corruption | 0.2 | 100 | Tighten spawns in high-load biomes |
World Size Guidance
Terraria World Size Performance Guide| World Size | Max KB/s | Players | Notes |
|---|
| Small | 2 | 1-4 | Small world for intimate gameplay |
| Medium | 5 | 5-10 | Balanced world size and performance |
| Large | 10 | 10-20 | High exploration but more lag risk |
| Journey | 15 | 20+ | Only for powerful hardware clusters |
Plugin Hygiene
Terraria Plugin Hygiene Checklist| Plugin | Impact Level | Recommendation |
|---|
| WorldEdit | High | Use sparingly and schedule inactive hours |
| TShockNPC | Medium | Throttle spawn events via config |
| KeepInventory | Low | Safe for always-on use |
| EssentialsREST | Medium | Monitor API call rates |
| MagicStorage | High | Limit crafting frequency to reduce IO |
Tuning Spawn Rates and Caps
- Adjust
server side spawn rates in config.json under SpawnRateMultiplier. - Cap entities via
MaxNPCs and MaxBalloons to prevent client desync. - For event-heavy biomes (e.g., Pumpkin Moon), temporarily lower spawn multiplier.
Selecting World Size
- Small: Ideal for 1-4 players; low memory and CPU usage.
- Medium: Balanced for 5-10 players; good for public lobbies.
- Large/Journey: High exploration; only on VPS with >=8 GB RAM and SSD.
Plugin Maintenance
- Schedule weekly plugin audits: remove unused plugins, update outdated versions.
- For high-impact plugins, use cooldowns and event throttles in their config files.
- Monitor server logs for
NPC spawns, WorldSave events, and plugin errors to catch memory leaks early.
Additional Tips
- Regular Restarts: Automate restarts every 24–48 hours during off-peak.
- Backups: Offload backups to external storage to reduce I/O load.
- Profiling: Use TShock’s
/profile command to detect lag hotspots. - Network: Ensure upload bandwidth ≥1Mbps per 5 players; use
nether plugin for compression.
Save this file as content/posts/terraria-server-lag.md and drop it into your Hugo project. The protable shortcodes will render your tables automatically.