Project Zomboid

Project Zomboid

[41.78] Vanilla++ 'Sophie MAIN' - SP & MP - v1.12.1 | Updated April 22nd 2024
 This topic has been pinned, so it's probably important
Deathstar  [developer] Oct 31, 2023 @ 10:37am
2
How to allocate more RAM to your game
This is an older method but I want to include it anways for people who are struggling with poor performance. By doing the following steps, you can allow for the game to make use of more of your RAM. Only do this if your machine has sufficient memory that's not occupied by other apps (browser, steam etc.). Check your task manager to see how much free RAM you have on average.

PLEASE NOTE: This may not actually result in increased performance. Some users have reported even more performance issues when allocating large amounts of memory (16 GB) when compared to the default. Project Zomboid is a CPU-heavy game moreso than a memory-heavy one.

++ 8 GB seems to be the sweetspot! ++

ALSO, note that anytime the game updates, you will likely have to make this edit again as the JSON files get redownloaded.


Step 1: Find your Zomboid JSON config file in the root folder

Navigate to your game's installation folder (NOT in Documents). To easily find this on Steam, right click your game in the library, hit Properties, go to Local Files and select Browse Local Folder. The address should look something like this: D:\Program Files\Steam\steamapps\common\ProjectZomboid\

This is your root folder. Inside here, find the following file: ProjectZomboid64.json (the .json may not appear). Open this file with an editor such as notepad or better yet, Notepad++.

Step 2: Allocate a custom amount of memory by editing a line

With the JSON file open, scroll down top the "vmArgs" section. Here, you should see a line that starts with "-Xmx". The number in this line dictates how much maximum memory the game can use. Edit only the four digits and give it a value that makes use of your free RAM without fully choking it. Ideally, this should be a Gigabyte amount, meaning the number should be divisible by 1024, e.g. 4096 or 8192.

If you want to allocate 8 GB of memory, the line should look like this: "-Xmx8192m",

Note that you can also use "g" for Gigabytes instead of m so "-Xmx8g" also works.

Again, please check the initial note of this post. This method may not increase performance at all, but it's there for you to try.

Step 2.1: If you are using Alternate Launch, edit the .bat file as well

In the same folder, find the ProjectZomboid64.bat or 32.bat depending on what you use and open it with notepad. Find "-Xmx" and change this to the same value as above, 8g for 8 Gigabytes and so on.
Last edited by Deathstar; Feb 25 @ 5:01am
< >
Showing 1-8 of 8 comments
How are you not aware of the G suffix ? Using the M suffix is way more work than it's worth, if you're giving gigs of memory instead of megs.
Deathstar  [developer] Jan 31 @ 10:24am 
2
Originally posted by +| CL rautamiekka:
How are you not aware of the G suffix ? Using the M suffix is way more work than it's worth, if you're giving gigs of memory instead of megs.

I'm aware. Outcome is the same. Also pretty rude way to phrase that.
gav1nc Jan 31 @ 4:37pm 
Originally posted by +| CL rautamiekka:
How are you not aware of the G suffix ? Using the M suffix is way more work than it's worth, if you're giving gigs of memory instead of megs.
"more work than it's worth" lol
Thank you for the tutorial, that is very helpful.
Is there a maximum you can allocate or is it also possible to set it to 16384MB?
Deathstar  [developer] Feb 2 @ 10:05pm 
Originally posted by Torflurch:
Thank you for the tutorial, that is very helpful.
Is there a maximum you can allocate or is it also possible to set it to 16384MB?

Theoretically, you can set it as high as your hardware can handle, BUT this may actually cause issues. The game runs on a JVM and Java has some issues when handed too much memory. Some users reported weird glitches when using 16 GB, turning this down to 8 fixed it. This is why I refer to 6-8 GB as the sweetspot and it's also what I do all of my testing with.
Thanks, will stay with 8GB then :)
Xaquri Feb 24 @ 1:22pm 
this is changing for the game itself right? Not for server allocation?
Deathstar  [developer] Feb 24 @ 1:23pm 
Originally posted by Xaquri:
this is changing for the game itself right? Not for server allocation?

Correct. Client and server are separate.
< >
Showing 1-8 of 8 comments
Per page: 1530 50