Zomboid Optimization Guide
Section 1: Glossary & Terminology
1. The JVM (Java Virtual Machine)
Project Zomboid runs on Java. The JVM is a simulated computer running inside your physical computer. It acts as the bridge between the game code and your hardware.
The game does not talk directly to your RAM; it asks the JVM for memory. If the JVM is poorly configured the game will starve regardless of how beefy your PC is.
2. Heap Memory
The specific pool of RAM assigned to the JVM for storing active game data (Zombie locations, player inventory, loaded map chunks).
Think of heap memory as a workbench. If the workbench is too small, you have no room to work (crash). If it is too big, it becomes messy and takes too long to clean (stutter).
3. Garbage Collection (GC)
Java manages memory automatically. When data is no longer needed (e.g., a zombie you killed and drove away from) the garbage collector deletes it to free up space on the heap.
Sometimes the GC pauses the entire simulation to perform a major cleanup. In-game, this looks like a micro-stutter or freeze every few seconds.
4. Memory Leak
When a mod or the game fails to label unused data as garbage. The heap fills up with useless data that cannot be deleted.
Performance degrades over time until the game crashes (out of memory error, or OOM).
1. VRAM (Video RAM)
The ultra-fast memory located on your Graphics Card (GPU). It stores textures, 3D models, and lighting data.
Project Zomboid is 2D but uses 3D methods to draw sprites. Double-sized textures and high-resolution mod assets live here. If VRAM fills up the OS will swap data to slower system RAM which can cause large FPS drops.
2. Draw Calls
Instructions sent from the CPU to the GPU telling it what to draw.
Every unique item on the screen (a blood splatter, a dropped weapon, a unique piece of clothing) requires a draw call.
1,000 zombies wearing the exact same outfit are easy to render (batching). 1,000 zombies wearing unique modded outfits create a traffic jam between the CPU and GPU.
3. Rasterization
The process of taking vector math (geometry) and turning it into pixels on your monitor.
Rain, fog, and blood decals are heavy on the rasterization pipeline.
1. Tick Rate / TPS (Ticks Per Second)
The heartbeat of the game logic. The server calculates the world state (zombie movement, crop growth, damage) 60 times per second (ideally).
If the server is overloaded by mods the TPS will drop. Players see rubberbanding (teleporting zombies) even if their own FPS is high.
2. Lua OnTick Events
Lua is the coding language used for PZ mods. An OnTick event is a script that runs every single frame.
If a modder writes a heavy script that checks your inventory every frame (60 times a second), your CPU creates a bottleneck. This is one of the main sources of lag in heavily modded games.
Section 2: JVM Tuning
Before we look at a single texture or zombie model, we must ensure the engine running the simulation is calibrated. Project Zomboid is built on Java. Java does not manage memory the same way C++ games do. It relies on a virtual computer that needs specific instructions on how to handle the heavy load of mods.
1. Memory Allocation
Imagine the heap memory as a warehouse where the game stores data. The garbage collector is the janitor.
Too Small (-Xmx2g): The warehouse is tiny. The janitor has to stop working and clean up every 5 seconds because there is no room to put new boxes. This can result in constant stuttering.
Too Big (-Xmx30g): The warehouse is massive. The janitor lets trash pile up for an hour. But when the warehouse finally gets full, the janitor has to lock the doors for a full 20 seconds to clean the massive mess. May cause the game to freeze for seconds at a time.
We need a warehouse that is big enough to hold mod data, but small enough for the janitor to clean quickly.
The sweet spot typically lies between 4GB and 8GB for light/medium mods, and 8GB to 12GB for heavily modded servers.
Technical Note: Allocating more than 16GB to PZ often yields diminishing returns and increases GC pause times. Only exceed 12GB if you are hosting the server and playing on the same machine with 100+ mods.
2. Garbage Collection
By default, older Java configurations use older garbage collectors that prioritize throughput over latency. They don't mind pausing the game to clean efficiently. In a real-time survival game, latency is king.
The Z Garbage Collector (ZGC) is a scalable low-latency garbage collector. It is designed to never pause the application for more than a few milliseconds regardless of how much RAM you give it.
Mods generate massive amounts of temporary data (scripts checking items, UI updates, texture swaps). ZGC cleans this up concurrently rather than stopping the game to do it.
3. Implementation- Navigate to your Project Zomboid install directory
- (usually `C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid`).
- Locate `ProjectZomboid64.json`.
- Open it with a text editor.
- Find the section labeled `vmArgs`.
- Replace or Modify the memory and GC lines to look like this (assuming a target of 10GB RAM):
"vmArgs": [
"-Djava.awt.headless=true",
"-Xms10g",
"-Xmx10g",
"-XX:+UseZGC",
"-XX:+AlwaysPreTouch",
"-XX:ZUncommitDelay=300",
"-Dzomboid.steam=1",
"-Dzomboid.znetlog=1",
"-Djava.library.path=win64/;.",
"-XX:-CreateCoredumpOnCrash",
"-XX:-OmitStackTraceInFastThrow"
],
Breakdown of Arguments:
-Djava.awt.headless=true: Prevents the JVM from spawning a window or capturing mouse inputs. This is to prevent the entire AWT library (Abstract Window Toolkit) from loading.
-Xms10g: Initial Heap Size. We set this equal to the max size to prevent the JVM from wasting CPU cycles dynamically resizing the memory pool during gameplay.
-Xmx10g: Max heap size. The hard limit.
-XX:+UseZGC: Activates the Z Garbage Collector.
-XX:+AlwaysPreTouch: Forces the OS to physically zero-out and commit every single byte of that 10GB during the game's launch.
-XX:ZUncommitDelay=300: Tells the ZGC to hold onto the ram it was using for a previous process for x amount of seconds (in this case we have it set to five minutes) before giving it back to your operating system.
Note: Remember to double check how much available memory you have to spare for an application. If you have 16gb of memory and you allocate 10gb to the JVM, all the while having Discord, YouTube and other applications open, you will most likely make your operating system choke.
Section 3: Graphics & VRAM
While the JVM handles the logic (CPU), the rendering pipeline handles what you see. Project Zomboid is unique because it is an isometric 2D game that uses 3D acceleration. This creates very specific bottlenecks that cannot be resolved by lowering the resolution alone.
1. Texture Compression & Double-Sized Textures
Double-sized means high resolution. When enabled, the game loads textures that are 2x larger on each axis (4x total pixel count).
If you have many mods (clothing, vehicles, weapons), the game will have difficulties fitting all of these high-res sprites into your GPU's VRAM.
Scenario: You turn around quickly.
Result: The GPU realizes it doesn't have the "Hello Kitty Backpack" texture loaded. It has to pause rendering, reach out to the slow system RAM, fetch the texture, and shove it into VRAM. This can cause frame drops.
Recommendation:
GPU with < 4GB VRAM: turn double-sized textures off.
GPU with >= 4GB VRAM: can turn double-sized textures on. You may still experience I/O issues using 100+ clothing/vehicle mods so keep this in mind.
2. Blood Decal FPS Killer
In most 3D games blood is just a temporary particle effect. In Project Zomboid blood is a persistent texture overlay.
Every time a zombie bleeds on the floor the game has to paint a new layer on that specific tile. If you fight a horde in one intersection, that intersection might eventually have 500+ unique blood layers.
The GPU has to draw the grass, then draw blood layer 1, then blood layer 2... up to blood layer 500. This skyrockets draw calls.
Recommendation:
Heavily Modded / High Pop: Set to Low or None.
Note: Low doesn't just lower the resolution of the blood; it strictly limits how many blood splatters can exist on a single tile.
3. Lighting Updates & Fog
Project Zomboid’s lighting engine (IsoGrid) is surprisingly heavy because it calculates line-of-sight in real-time on the CPU, then sends that info to the GPU.
Volumetric fog requires complex math per pixel. High quality fog in PZ is notoriously unoptimized for the visual gain it provides.
Recommendation:
Set Fog to Legacy or Medium, the visual difference is negligible. Leave lighting updates at the default value or bring it to the lowest. PZ is fairly CPU-bound, so if you have a lower-end processor or trying to squeeze in extra frames this may help.
4. User Interface
In Build 41, the method used to render UI elements is very inefficient, leading it to be one of the main sources of performance issues. The more UI elements you have on your screen (and additionally the speed at which they render) the lower your frames.
Offscreen UI Rendering: Disabling this will allow the interface windows to run at higher frames, but comes with a significant performance impact.
Offscreen UI Rendering FPS: The lower the value the better the rest of the game will run, at the cost of the visual responsiveness of most UI elements.
5. Implementation
- Locate your options.ini file within your users Zomboid folder (typically at C:\Users\yournamehere\Zomboid unless you installed it on a different drive).
textureCompression=true: Keep set to true. Disabling this will decompress the textures in your VRAM, increasing memory pressure significantly with virtually zero visual gain on 1080p monitors.
texture2x=true: This is basically the closest you're going to get to an in-game VRAM allocation setting. If you have a weak GPU and you are experiencing significant stuttering (even with your memory properly allocated) switch it to false.
maxTextureSize=1: The maximum size of a single texture page, 1 = 2048x2048 (Standard). Switch it to 2 = 1024x1024 (Compressed/Low End) if you are running this game on integrated graphics.
uiRenderOffscreen=true: set it to true and forget about it if you are playing on a heavily-modded server and/or have a weak CPU.
uiRenderFPS=20: 20 is the default value, which is the lowest you can go before the interface feels like a slideshow and starts being detrimental to your survival during gameplay. If you need to squeeze out extra frame you can set it to 10.
This guide was created by its original author on the Steam Community. Are you the author and want it removed? Request removal.