Memory Spike

Bugs that are actually features.
Metalface7
Inserter
Inserter
Posts: 28
Joined: Sat Jun 11, 2016 1:49 pm
Contact:

Memory Spike

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14301
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Memory Spike

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Metalface7
Inserter
Inserter
Posts: 28
Joined: Sat Jun 11, 2016 1:49 pm
Contact:

Re: Memory Spike

Post 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.
Last edited by Metalface7 on Thu Apr 27, 2017 3:57 pm, edited 1 time in total.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14301
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Memory Spike

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Metalface7
Inserter
Inserter
Posts: 28
Joined: Sat Jun 11, 2016 1:49 pm
Contact:

Re: Memory Spike

Post by Metalface7 »

I've always had it set to "all".
Metalface7
Inserter
Inserter
Posts: 28
Joined: Sat Jun 11, 2016 1:49 pm
Contact:

Re: Memory Spike

Post by Metalface7 »

Update: the game seems to clear most of it's GPU memory usage and put it in RAM when the game autosaves.
Post Reply

Return to “Not a bug”