Server lag killing the vibe? Let’s pinpoint the cause fast and apply fixes that actually work. Need stability? Check our optimized Minecraft hosting.
Prerequisites
- Access to your Oxygenserv panel (login and password)
- Server IP and port:
25565(Java) or19132(Bedrock) - File manager or FTP/SFTP access
- Operator rights in-game or console access
- Helpful tools: EssentialsX (
/tps,/memory), spark or Timings, WorldBorder/Chunky, ClearLagg - A recent full backup before changes
Detailed steps
-
Measure first: live TPS and RAM
Open the Oxygenserv console and run/tps(or/memorywith EssentialsX). Aim for19–20 TPSand at least100 MBfree memory. If logs show “Can't keep up!“, your tick time is too high. Record numbers for 2–3 minutes while players are online. If TPS dips below 19 or free RAM is near zero, proceed with the next steps. -
Find the hogs: entities, chunks, plugins
Start a quick profile: on Paper/Spigot run/timings on, wait 2–5 minutes, then/timings pasteand open the link. Or use spark:/spark profiler --timeout 60and open the report. Look for heavy sections: entities (mobs/items), redstone, hoppers, or a specific plugin. If one plugin tops CPU usage, update, reconfigure, or replace it. -
Lower view and simulation distance
In the file manager, openserver.properties. Changeview-distance=10toview-distance=6and, if present, setsimulation-distance=6(4–6 depending on player count). Save, then hit the green “Restart” button. On modern versions this barely affects player experience but cuts CPU load a lot. -
Switch to Paper and update everything
In the version selector, pick thePaperJAR instead of Vanilla/CraftBukkit/Spigot. Update Minecraft, plugins, and mods to the latest compatible builds. Paper delivers big optimizations out of the box. Restart and check/tpsagain. If a plugin breaks, find a maintained alternative. -
Tune Spigot/Paper: entity ranges and hoppers
Editspigot.ymland adjust these safe values:
a)entity-activation-range: animals16, monsters24, villagers16.
b)merge-radius: item3.0, exp3.0(fewer dropped items ticking).
c)ticks-per:hopper-transfer: 8,hopper-check: 8.
Save and restart. If farms feel too slow, bump slightly (e.g.,hopper-transfer: 6). -
Clean up entities and heavy chunks
Install ClearLagg if needed. Use/lagg clear(items) and/lagg killmobs(mobs) sparingly during spikes; read the result message to confirm. To find hot chunks, run/lagg chunkand teleport there to fix farms or contraptions. Announce wipes to players and exclude sensitive entities in ClearLagg config. If you over-delete, restore from your backup. -
Limit world size and pre-generate chunks
Set a border with WorldBorder:/wb set 5000 spawnthen/wb fillto pregen. Or use Chunky:/chunky radius 5000then/chunky start. Pregeneration prevents CPU spikes when players explore new areas. Run it off-peak; you’ll see progress in console. If you hit timeouts, reduce radius and resume. -
Schedule automatic restarts
In the Oxygenserv panel, open the Scheduler. Create a “Restart” task every 12h (e.g., 05:00 and 17:00) and broadcast a 5‑minute warning (sayor a plugin). Restarts clear memory leaks from some plugins/mods. After setup, check logs to confirm it runs. For busy servers, schedule at local night time. -
Trim your mods/plugins
List them with/plugins(or via thepluginsfolder). Remove unused ones; to disable without deleting, rename to.jar.disable(e.g.,EssentialsX.jar.disable). Update the heavy hitters first (based on Timings/spark). Restart and test/tps. If you see “NoClassDefFoundError“, you likely picked the wrong build for your MC version. -
Reduce network latency (ping)
From your PC, test: Windowsping -n 5 SERVER_IP, macOS/Linuxping -c 5 SERVER_IP(no port). Target<100 ms; above200 msmeans you’re too far from the server location. On Oxygenserv, request a location closer to you. Prefer Ethernet over unstable Wi‑Fi. If everyone has high ping, ensure no external firewall is throttling port25565. -
Improve client FPS too
Suggest OptiFine (or Sodium/Lithium on Fabric). Recommended settings: Graphics “Fast”, Smooth Lighting “OFF”, Render Distance4–8, Entity Shadows “OFF”, Particles “Minimal”. Press F3 to check FPS; aim for30+. If the server shows20 TPSbut a player still stutters, that’s a client FPS issue.
Tips & optimization
– Safe starting values for 10–30 players: view-distance=6, simulation-distance=6, entity activation 16/24, hoppers 8/8.
– Pregenerate at least a 5k radius around spawn to stabilize CPU during exploration.
– Avoid ultra-fast redstone clocks; add a tick delay. Massive hopper lines are expensive—use fewer, slower hoppers instead.
– On Paper, run longer Timings (e.g., 15 min) after each change; tweak one setting at a time to see impact.
– RAM: don’t over-allocate. Leave 1–2 GB to the OS on dedicated boxes; on managed hosting, respect your plan and watch /memory.
FAQ
My TPS is 20 but players still lag. Why?
Likely network latency or client FPS. Test ping (ping -n 5/ping -c 5) and check FPS with F3. If ping >200 ms, move the server closer. If FPS <30, use the suggested video settings.
How much RAM do I need?
Rough guide: Vanilla/Paper, 10–20 players: 4–6 GB. With moderate plugins: 6–8 GB. Heavy modpacks (200+ mods): 8–12 GB+. Watch /memory; if free <100 MB often, upgrade.
Will ClearLagg delete important stuff?
By default it can remove dropped items. Exclude what you need (e.g., item frames, armor stands) in its config. Run /lagg check and configure before automating.
Best way to pinpoint server-side lag?
Use /timings on then /timings paste and review top consumers. With spark, run /spark profiler --timeout 120 and read the flamegraph to see heavy plugin methods.
Bedrock vs Java differences?
Ports differ (19132 Bedrock, 25565 Java) and Bedrock also uses server-side simulation distance. The same principles apply: lower view/simulation distance, pregenerate, limit entities.
Now you’ve got a battle plan: measure, optimize, verify. Spend 15 minutes applying these tweaks and your server will feel snappy. Need help? We’ve got your back.