[1.1.109]The memory usage is very high

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
garygo
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Jul 25, 2024 5:53 pm
Contact:

[1.1.109]The memory usage is very high

Post by garygo »

I used pymod.
Now the game uses more than 72GB of memory.
My friends can't join my game because they don't have enough memory (he has 32GB of memory)

I started with 32GB of RAM, Saving and loading archives is very slow. So I added 2 sticks of 32gb RAM for a total of 96GB, This significantly reduces save and load times. When I added the memory, it took up about 50GB, and after a while, it is now about 72GB. If memory usage continues to increase, I won't be able to play.I want to know what is causing the memory footprint, so I try to delete everything I know.

I took the following steps to remove them:
1. I used the /editor command to manually delete my factorys
2. I used the following command to remove the chunks

Code: Select all

/c local surface = game.player.surface;
game.player.force.cancel_charting(surface); 
for chunk in surface.get_chunks() do
  if (chunk.x < -1 or chunk.x > 1 or chunk.y < -1 or chunk.y > 1) then
    surface.delete_chunk(chunk)
  end
end
3. I used the "/c game.player.surface.clear_pollution()" command to remove all pollution

The problem didn't get any better, though, and it still took up around 72GB of my memory

save files: https://drive.google.com/file/d/1tOb-Rc ... sp=sharing
log: https://drive.google.com/file/d/1mrWdsJ ... sp=sharing

garygo
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Jul 25, 2024 5:53 pm
Contact:

Re: [1.1.109]The memory usage is very high

Post by garygo »

I tried to migrate all factories to a new save using the editor's import layer function. I succeeded, and now the memory usage is only 5GB, which saved my game progress. It's a pity that I lost other progress, such as technology and TURD.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2326
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.109]The memory usage is very high

Post by boskid »

Given that this looks to be related to excessive amount of script inventories created by Mining_Drones mod, i forwarded this to Klonan.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5156
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [1.1.109]The memory usage is very high

Post by Klonan »

garygo wrote:
Fri Jul 26, 2024 4:18 am
I used pymod.
Now the game uses more than 72GB of memory.
My friends can't join my game because they don't have enough memory (he has 32GB of memory)
Hello, It was a problem with my mod mining drones, it was leaking inventories.

I have released an update, can you try it and tell me if it fixes the problem in your proper save?
https://mods.factorio.com/mod/Mining_Drones/downloads

garygo
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Jul 25, 2024 5:53 pm
Contact:

Re: [1.1.109]The memory usage is very high

Post by garygo »

Klonan wrote:
Sat Jul 27, 2024 4:24 pm
garygo wrote:
Fri Jul 26, 2024 4:18 am
I used pymod.
Now the game uses more than 72GB of memory.
My friends can't join my game because they don't have enough memory (he has 32GB of memory)
Hello, It was a problem with my mod mining drones, it was leaking inventories.

I have released an update, can you try it and tell me if it fixes the problem in your proper save?
https://mods.factorio.com/mod/Mining_Drones/downloads
Thank you, the issue has been resolved.

Here's what I did: I updated the mod to 1.1.11 and loaded my save for the first time. The memory usage spiked to 82GB, consuming all my available memory. After waiting a long time, I managed to enter the game, and the memory usage dropped to 40GB (perhaps the memory was released, but that's what I saw in Windows Task Manager). I saved the game (it took less than 10 seconds) and closed the client. Then, I reopened the client and loaded the save again. This time, the memory usage was only 5GB, and everything seems to be working fine now.

Post Reply

Return to “Technical Help”