Server lag or player lag?
If one player struggles while everyone else is fine, the problem is usually their connection or distance from the server. If everyone feels it at the same time, especially at busy times or late in the day, it's the server.
Ask a few players when it happens. Lag that builds up over hours and clears after a restart is the classic sign of a server that needs more frequent restarts or has too much in the world.
Restart regularly
DayZ servers slow down the longer they run. Nitrado recommends restarting four to six times a day. If you restart less often and lag builds through the day, more restarts are the cheapest fix there is. See how to schedule restarts.
Too much in the world
Every item, body, car, infected and base part is something the server tracks. Big loot boosts with long lifetimes, dozens of sprawling bases and hundreds of cars add up.
- Keep lifetimes short for common loot so it clears. See item despawn times
- Avoid huge loot multipliers; 2x to 3x is usually plenty. See how to increase loot
- Don't push vehicle counts far beyond vanilla
- Let abandoned bases decay rather than giving everything very long lifetimes
Infected and animals
Infected and animals are some of the busiest things on a server. If you've raised ZombieMaxCount or AnimalMaxCount in globals.xml, bring them back towards vanilla (1000 and 200) and see if it helps. Infected hordes in events.xml add up too. See zombie and animal numbers.
Mods on PC servers
On modded servers, a single badly written or outdated mod can cause constant script errors that drag performance down. Check the script logs for repeating errors, keep mods updated, and remove mods you don't really use. See server logs.
Watch the server's own warnings
serverDZ.cfg has a serverFpsWarning setting (15 in Bohemia's example, with 11 as the minimum) that makes the server warn in its log when its frame rate drops below that value. If you see those warnings at busy times, the server is overloaded. Ping settings (pingWarning, pingCritical and MaxPing) handle players with very high ping.
A quick lag checklist
Work through these in order and change one thing at a time:
- Restart more often, at least four times a day
- Shorten lifetimes for common loot
- Bring infected and animal counts back towards vanilla
- Reduce vehicle counts if you raised them a lot
- Check logs for repeating errors, especially on modded servers
- Turn on Reduce log output on Nitrado if logs are very busy
Ping and location
Players far from the server feel delay on every action, which looks like lag to them even when the server is healthy. If most of your community is in one region and the server is in another, moving the server closer can help more than any setting. See choosing a host.
When it's time for more resources
If you've restarted regularly, trimmed the economy and checked mods, and the server still struggles when full, it may simply need more resources. A server that's often full with many bases and mods needs more than a small group's server. Ask your host whether a larger plan gives more CPU and memory, not just more slots.