Guide

Server performance

Limit how many times per second the server runs its scripts, so it does less work without players noticing.

Introduction

A DayZ server runs its scripts (all the mod code, timers, events) once per frame, as fast as the PC allows. On our test server that was 5,000 to 6,000 times per second with one player online. Nobody can feel the difference between that and a few hundred times per second, so most of that work is wasted.

Hunter Mods Core can cap it. The setting is in this file. Restart the server after you change it:

ServerProfile\Hunter_Mods\Global\HM_Settings_Global.json

HM_Settings_Global.json1 lines
"serverUpdateRateLimit": 500

serverUpdateRateLimit

How many times per second the server runs its scripts.

ValueWhat happens
500 (default)Scripts run 500 times per second, one update every 2 milliseconds. Also used when the setting is missing from your file.
50 or moreScripts run that many times per second.
1 to 49Too low, so it's set to 50. The HM log says so.
0Off. The server runs as fast as it can, like a normal DayZ server (or with Expansion's limit, see below).
  • Lower means less work for the server, but everything done by scripts reacts a little later.
  • 50 is the lowest it goes: one update every 20 milliseconds, which is about as long as the short pauses a normal server already has every few seconds.
  • 500 is a good value for almost every server. Only change it if you know why.

What it changes and what it doesn't

Runs less often: the script update of the whole server: mission updates, script timers, events, the code of every mod that runs on that update.

Not touched: the game engine itself (physics, network, AI, the loot economy), messages between players and server, and the things the engine calls directly on players and items.

  • Your server FPS in the server log (Average server FPS) stays the same. The engine still runs every frame, it just skips the script update on most of them.
  • Timers stay correct: the time of the skipped frames is added up and passed on, so a 10 minute timer still takes 10 minutes.

Expansion

Expansion has the same kind of setting (ServerUpdateRateLimit in its CoreSettings.json). Two limits at once would get in each other's way, so only one is used:

serverUpdateRateLimitWhich limit is used
Anything above 0 (the default 500 too)Ours. Expansion's ServerUpdateRateLimit is ignored.
0Expansion's, as set in its CoreSettings.json. If that's 0 too, there's no limit at all.

Already set a limit in Expansion and want to keep it? Set our serverUpdateRateLimit to 0.

Check it in the log

When the server starts, the HM log (ServerProfile\Hunter_Mods\Logs) shows which limit is used:

HM log2 lines
HM_GLOBAL: Limiting server script update rate to 500 per second
HM_GLOBAL: Expansion ServerUpdateRateLimit ignored, HM serverUpdateRateLimit is used

The second line only shows up when Expansion is running. With a value that's too low you'll see:

HM log1 lines
[ERROR]HM_GLOBAL: serverUpdateRateLimit 20 is too low, using 50. Recommended 500.

With 0 there's no line at all.