Page 1 of 1

Memory Spike

Posted: Wed Apr 26, 2017 6:50 pm
by Metalface7
It appears that factorio sometimes has large spikes in RAM usage. Typically when I start the game with the new high-res settings, the game sits around 2.3 Gigs of RAM, but sometimes it balloons to over 3 Gigs, and the game then starts to stutter every 5-10 secs. However, this always happens when I quit one world and load another.
The game also did this in previous versions.

Re: Memory Spike

Posted: Wed Apr 26, 2017 7:02 pm
by Rseding91
The high res graphics take more RAM and VRAM to run. If you don't have enough RAM then I wouldn't recommend using the high res option.

I'm not able to reproduce any memory leak - when I load a map and exit it returns to the memory usage before having loaded that map.

3 GB for high res + a save file is well within the normal for Factorio. The high res sprites take 1.8 GB of RAM and then the game itself takes a few hundred MB for the prototypes/sounds. Finally the larger your map is the more RAM is needed to run it.

Re: Memory Spike

Posted: Wed Apr 26, 2017 11:03 pm
by Metalface7
I have 16G RAM and 2G VRAM, so the amount for both shouldn't be an issue - the game only uses about 1.6G VRAM with High-res. It just seems odd that the game only starts stuttering when the RAM usage gets over 3G, even though I haven't really explored much beyond my starting point.

Edit: The game just did it again, and It appears that it wasn't making good use of my VRAM (it was only using ~400MB of it). Could it be that Optimus is interfering with the game's ability to se my GPU? When the RAM usage is under 2.3GB the game uses my GPU more.

Re: Memory Spike

Posted: Wed Apr 26, 2017 11:26 pm
by Rseding91
Metalface7 wrote:I have 16G RAM and 2G VRAM, so the amount for both shouldn't be an issue - the game only uses about 1.6G VRAM with High-res. It just seems odd that the game only starts stuttering when the RAM usage gets over 3G, even though I haven't really explored much beyond my starting point.

EditL The game just did it again, and It appears that it wasn't making good use of my VRAM (it was only using ~400MB of it). Could it be that Optimus is interfering with the game's ability to se my GPU? When the RAM usage is under 2.3GB the game uses my GPU more.
Go into the graphics settings and try changing "VRAM usage" to "all". That tells the game to load all of the sprites into VRAM instead of just some.

Re: Memory Spike

Posted: Wed Apr 26, 2017 11:43 pm
by Metalface7
I've always had it set to "all".

Re: Memory Spike

Posted: Wed May 03, 2017 1:59 pm
by Metalface7
Update: the game seems to clear most of it's GPU memory usage and put it in RAM when the game autosaves.