Project Zomboid Server Memory Calculator: Heap Range Estimator
Build 42.19 · conservative heap range estimator · confirm with live /stats
/stats and crash logs.
Use this page to pick a starting Java heap range for Host memory or dedicated -Xmx, then size the host machine above that heap. For full monitoring, GC notes, and platform launch details, read the
server memory 101 guide.
Inputs
Suggested Java heap range
Example caps: -Xmx4096m … -Xmx6144m
Host UI default is 4096 MB; options step up to 16 GB.
Breakdown (mid-range planning view)
- Baseline band: 2.5–4.0 GB
- Player load band: 1.2–2.4 GB
- Mod load band: 0.5–1.5 GB
- Shared-client machine reserve (not heap): 0 GB
- Suggested free machine RAM: 8–10 GB free for this role
-Xmx; if Used stays far below Max, do not keep pouring RAM into an oversized heap.
What the estimate is based on
These bands are rough planning guesses only. They are not official engine constants and can be wrong for extreme sandboxes or leaky mod packs.
- Baseline (low–high): Build 41 ≈ 2.0–3.0 GB; Build 42 ≈ 2.5–4.0 GB for a quiet dedicated process.
- Per peak player (low–high): about 0.15–0.35 GB of extra heap planning band—not a guarantee.
- Mods: none 0; light 0.25–1.0 GB; moderate 0.75–2.5 GB; heavy 1.5–4.5 GB (higher on B42).
- Shared PC: reserves about 3–4 GB of machine RAM for the client + OS comfort. That amount is added to “free machine RAM,” not to
-Xmx. - OS / non-heap buffer: about 2 GB dedicated, about 3 GB when sharing a PC—again for machine sizing, not Java heap.
- Measured peak override: if you enter peak Used MB, the suggested heap is roughly peak × 1.25–1.45 (at least +1 GB above peak). In-game Host is capped at its 16 GB UI limit; dedicated output is not inventing a hard ceiling.
Where to apply the heap value
| Launch style | What to set | Notes (Build 42.19) |
|---|---|---|
| In-game Host | Server Memory dropdown | Defaults to 4 GB (4096 MB). Steps go from about 0.75 GB up to 16 GB. No separate -Xmx edit is required for a pure Host start. |
| Windows dedicated | The real start batch / launcher config your service runs | Look for -Xmx####m in the file the process actually executes. Hosting panels may inject their own args—edit what the running process uses. |
| Linux dedicated | Start shell script, systemd unit, or panel config that launches Java | Same rule: edit the -Xmx your unit actually passes. Service units often override shell scripts. |
| macOS sample scripts | StartServer.command / similar samples |
Stock samples may omit an explicit heap cap. Add -Xmx if you rely on them. The Steam client’s own -Xmx is for the client process, not a dedicated-server template. |
# Example only — paste onto the Java line your host already uses
java ... -Xmx8192m ... zombie.network.GameServer
Validate with /stats, not /stopwatch
/stopwatch is not a memory command
Use /stats (and Admin Panel → Show Statistics) for server statistics. Prefer peak Used under real load against Max.
After changing heap
Restart once, fill the world with your normal peak players and hot areas, then record peak Used. Paste that MB value back into the optional field above to tighten the range.
Healthy signal
Used rises with activity and recovers or plateaus when quiet. If Used only climbs for hours until restart, raise heap only as a temporary safety net while you bisect mods and extreme population settings.
Limits of this estimate
- It does not see world size, active chunks, zombie density, vehicle count, or GC pause times.
- Hosting-panel “RAM” labels may not map 1:1 to Java heap.
- Native / off-heap memory means OS tools often show higher RSS than Max heap.
- A crash may be heap OOM—or pathfinding, disk, or network lag instead.
If the server already dies with java.lang.OutOfMemoryError: Java heap space, raise the heap one practical step and fix the load source—see the
memory 101 guide
and the general
server administrator tips.