How To Allocate More RAM To Project Zomboid (Client Heap, Build 42.19)
Client Java heap · Build 42.19 · Windows & macOS · Not a multiplayer server sizing guide
-Xmx) in the platform launch config the game already uses—not by pasting flags onto a ProjectZomboid64.exe shortcut. On Windows that is usually ProjectZomboid64.json under the Steam game folder (vmArgs). On the current macOS app bundle, heap is set in Info.plist as -Xmx3072m (3 GB). Prefer a modest -Xmx change, keep -Xms lower or unchanged, leave free system RAM for the OS, and re-test with Task Manager / Activity Monitor plus a before/after save load.
What allocation changes (and what it does not)
Project Zomboid’s client is a Java process. -Xmx is the maximum Java heap the JVM may grow to. -Xms is the initial heap reservation. Raising -Xmx can help when the client is heap-bound (for example logs or crashes that mention OutOfMemoryError / Java heap space), heavy long sessions, or large mod packs that push heap high.
- It can help: heap exhaustion, some long-run memory pressure, fewer GC-related stutters when the old ceiling was too tight.
- It does not guarantee: higher FPS, fewer stutters from CPU/GPU/disk, or “more stable” play in every case. Oversizing the heap can increase GC pause risk and leave the OS with too little free RAM.
- Process RAM ≠ heap only: native libraries, metaspace, thread stacks, and file cache sit outside
-Xmx. Task Manager “Memory” for the process is usually higher than the heap value you set.
ProjectZomboid64.exe and appending -Xms… -Xmx… to the Target field does not set client heap on current Windows builds. The launcher reads JVM flags from a JSON config (via -pzexeconfig). Edit that JSON instead of the shortcut Target line.
Default heap by platform
There is no single “always 2 GB” client default across every OS and install path. Use the value in your launch config as the starting point.
| Platform | Where heap is set | Typical Build 42.19 default |
|---|---|---|
| Windows (JSON launcher) | JSON vmArgs loaded with -pzexeconfig |
-Xms1800m and -Xmx2048m (about 2 GB max) |
| macOS (Steam app bundle) | Project Zomboid.app/Contents/Info.plist → JVMOptions |
-Xmx3072m (3 GB max; no separate low -Xms in that list) |
| Linux (JSON launcher pattern) | JSON vmArgs |
Same pattern as Windows: -Xms1800m / -Xmx2048m |
After a Steam update, always re-open the config: updates can overwrite local edits. Keep a copy of your working JSON or plist fragment outside the game folder.
Windows: edit the launcher JSON
On a normal Steam Windows install, open the game folder (Steam → Project Zomboid → Manage → Browse local files). Look for ProjectZomboid64.json next to the 64-bit client. That file’s vmArgs array is where the JSON-driven launcher reads heap flags. The Windows client is started with -pzexeconfig <file>.json—not with heap flags glued onto the EXE path.
- Close the game completely (and any Host server started from the same client).
- Back up
ProjectZomboid64.json(copy to Desktop or a dated filename). - Open the JSON in a plain-text editor (Notepad, VS Code, Notepad++). Avoid Word-style editors that change quotes or encoding.
- Find the
"vmArgs"array and the lines for-Xms…and-Xmx…. - Change only what you need. Example: raise max heap to 4 GB while leaving a moderate initial heap:
"vmArgs": [ "-Xms1800m", "-Xmx4096m", "...other existing flags..." ] - Save the file, launch from Steam as usual, then confirm the process still starts and your save loads.
vmArgs. Match the keys already present in your file—labels and order can differ slightly by install.Safe edit habits
- Keep valid JSON: commas between array entries, straight double quotes.
- Prefer
-Xmx4096m/-Xmx4Gstyle values your file already uses; do not mix broken units. - Do not delete unrelated
vmArgs(Steam, library path, GC flags) unless you know why they are there.
What not to do
- Do not append
-Xms/-Xmxto a desktop shortcut Target forProjectZomboid64.exeand expect that to be authoritative. - Do not set
-Xmsequal to a large-Xmx“for performance” by default—that forces a full reservation at start and is rarely required. - Do not set heap equal to total machine RAM; leave multi-GB free for OS, GPU driver, browser, Discord, and antivirus.
macOS: edit Info.plist JVMOptions
On the current macOS Steam build, the client is launched as Project Zomboid.app. Heap is not taken from a Windows-style root JSON in the same way; it is listed under JVMOptions in:
/…/steamapps/common/ProjectZomboid/Project Zomboid.app/Contents/Info.plist
The shipping options include -Xmx3072m along with other JVM flags (for example -XX:+UseZGC on current Build 42.19 macOS). To raise the ceiling:
- Quit Project Zomboid.
- Copy
Info.plistsomewhere safe before editing. - Open
Info.plistin a text editor (or Xcode’s property list editor if you prefer). - Under
JVMOptions, change-Xmx3072mto a higher value such as-Xmx4096mor-Xmx6144m, keeping the rest of the list intact. - Save, re-launch from Steam, and confirm the game starts. Steam updates may restore the stock plist—re-apply after big updates if needed.
.app bundle can be reset by game updates. If Gatekeeper or Steam “validates” files after a change, restore from your backup and re-apply a minimal -Xmx edit only.
How much to set
Start from the default in your config, then step up in 1–2 GB increments only if you have a concrete reason (OOM, heap stuck at the ceiling, or mod-pack guidance that calls for more). There is no one-size-fits-all number—the right limit is whatever leaves the OS and other apps enough free RAM under real play.
| System RAM (total) | Conservative client -Xmx starting point |
Notes |
|---|---|---|
| 8 GB | Stay near default (2–3 GB) or try +512 MB–1 GB only if needed | Easy to thrash the OS; fix mods/resolution first |
| 16 GB | 4 GB is a common experiment after default | Leave several GB free for OS + browser + overlays |
| 32 GB+ | 4–8 GB only if measurement shows need | Huge heaps are not free performance; measure GC and FPS |
| Same PC Host + client | Budget client heap and server heap separately | Host default server memory is separate (often 4 GB)—see server guide below |
-Xms
Prefer adjusting -Xmx first. Setting -Xms equal to a large -Xmx reserves that much heap immediately and does not automatically improve FPS. Use a high equal pair only if you have a specific reason and enough free system RAM.
Measure before and after
- Before you change anything: load the same save, same town, same mod list. Note FPS feel, hitching, and whether the client crashes with heap errors.
- Windows: Task Manager → Details (or Processes) → find the Project Zomboid / Java process → Memory column. Optionally use Resource Monitor for a longer sample.
- macOS: Activity Monitor → Memory for
Project Zomboid/ Java. Watch “Memory Used” and whether the machine starts swapping (Memory Pressure yellow/red). - Change one variable: only
-Xmx(or only mod list) between tests. - Success criteria: fewer OOM crashes, stable load of the same area, no worse hitching, and the OS still has free RAM. If FPS is unchanged, look at GPU, resolution, zombies on screen, and mods—not only heap.
Console logs under the user Zomboid folder (for example console.txt on Windows) help when the client dies with Java errors. Build 42.19 has no built-in heap size display—use Task Manager / Activity Monitor and those logs.
When more RAM will not fix lag
- CPU-bound zombie pathing and dense combat—heap will not replace CPU time.
- GPU / resolution / zoom limits—lower quality or resolution before large heap experiments.
- Disk hitching on HDD or full SSDs during streaming and saves.
- Broken or outdated mods—disable half the list and re-test; B41-only mods on B42 are a common source of errors.
- Network multiplayer lag—client heap is not a substitute for host tick, bandwidth, or server heap.
For broader crash and stutter paths, use the errors, crashes, and lag guide and the UI scaling / 4K performance notes.
Client vs multiplayer server memory
Editing the client JSON or plist does not replace multiplayer server heap settings. Host co-op uses a separate Server memory control (default 4 GB on current Host UI) written into host.ini as memory=…. Dedicated servers need -Xmx in their own start script or host panel.
FAQ
Is editing the JSON the same as setting -Xms/-Xmx?
- Yes on current Windows packaging. Changing
-Xms/-Xmxinside the launch JSON (or the macOSJVMOptionslist) is how those flags actually take effect—there is no separate second method.
Can I just add -Xmx8G to Steam launch options?
- Prefer the platform config files this client actually reads (Windows JSON
vmArgs, macOSInfo.plist). Steam launch options are not a reliable substitute for those. If a third-party launcher has its own JVM field, follow that product’s docs—not a generic EXE Target line.
Will 8 GB of heap make the game “run smoother”?
- Only if you were heap-limited. Otherwise you risk longer GC pauses and starving the OS. Measure; do not max the slider for its own sake.
Steam reinstalled my defaults—what now?
- Re-apply your backed-up
vmArgsorJVMOptionsline after the update. Keep the backup outside the game directory.
I host friends on the same PC—what do I raise?
- Raise Host / dedicated server memory for the server process, and only raise client heap if the client itself is memory-starved. Both compete for the same physical RAM—see the server memory guides linked above.