Rimworld Memory Questions (Rimworld Loves to Eat)

Started by TastyCookies, May 22, 2018, 11:03:40 AM

Previous topic - Next topic

TastyCookies

1. Okay, so i was playing around with my mod list in the main menu and I am wondering if this is normal for Rimworld to do this with mods. Each time I click on the mod menu button, my RAM increases by 100mb, each time I do this it keeps going up and up and up to the point where I can actually cause the application to cease because I think Rimworld has reached its memory limit. Shouldn't Rimworld release the memory afterwards or this considered a memory leak? I do have 183 mods.

2. Why does Rimworld use alot of memory after initializing? With my mod list of 183 mods, Rimworld is already using over 2.2gb of RAM before I even start playing and if I attempt to press the world map button (100% coverage), my world has patterns of snow flakes all over (looks like an artificial world being constructed). Is there any way for the memory to be reduced after initialization?

Thanks for taking the time to read this :)

Example of what my world looks like from 2: https://i.redditmedia.com/Zy1s3zwrwU7euStf8urMjpE6GJNT2j7ppZ27GXdpOEw.png?s=142a513fe1a35286337d40f5fb2ef15d

My Mod list (sorry I don't know how to put spoilers)
<li>Core</li>
         <li>HugsLib</li>
         <li>ModSwitch</li>
         <li>JecsTools</li>
         <li>Miscellaneous 'CORE'</li>
         <li>RuntimeGC</li>
         <li>MuteGC</li>
         <li>EdB Prepare Carefully</li>
         <li>ED-EnhancedOptions</li>
         <li>RimStory</li>
         <li>ResearchPal</li>
         <li>Color Coded Mood Bar</li>
         <li>Better Workbench Management</li>
         <li>Blueprints</li>
         <li>Psychology</li>
         <li>RT's Weapon Pack B18</li>
         <li>RT's Weapon Pack B18 - visibility patch</li>
         <li>Star Wars - The Force</li>
         <li>Star Wars - Fully Functional Lightsabers</li>
         <li>Star Wars - Factions</li>
         <li>Call of Cthulhu - Cults</li>
         <li>Call of Cthulhu - Factions</li>
         <li>Call of Cthulhu - Industrial Age</li>
         <li>Call of Cthulhu - Cosmic Horrors</li>
         <li>Rim of Madness - Werewolves</li>
         <li>Rim of Madness - Vampires</li>
         <li>[CP] The U.S. Military Kit (B18)</li>
         <li>[CP] The British Military Kit (B18)</li>
         <li>[CP] The DOOM Kit (B18)</li>
         <li>Medieval Times</li>
         <li>A RimWorld of Magic</li>
         <li>Giddy-up! Core</li>
         <li>Giddy-up! Battle Mounts</li>
         <li>Giddy-up! Caravan</li>
         <li>Misc. Robots</li>
         <li>Misc. MAI</li>
         <li>Misc. Robots++</li>
         <li>Misc. Training</li>
         <li>Misc. Incidents</li>
         <li>A Dog Said...</li>
         <li>VGP Vegetable Garden</li>
         <li>VGP Garden Gourmet</li>
         <li>VGP Garden Drinks</li>
         <li>VGP Garden Fabrics</li>
         <li>VGP Garden Medicine</li>
         <li>VGP Garden Resources</li>
         <li>VGP Garden Tools</li>
         <li>VGP More Veggies</li>
         <li>VGP Xtra Trees and Flowers</li>
         <li>VGP Soylent Production</li>
         <li>VGP_CoffeeTeaDrugs</li>
         <li>Zombieland</li>
         <li>Save Our Ship</li>
         <li>FishIndustry</li>
         <li>Rimatomics - Beta Test</li>
         <li>Dubs Bad Hygiene - BETA</li>
         <li>[CP] Detailed Body Textures (B18)</li>
         <li>Facial Stuff 0.18.5.2</li>
         <li>Spoons Hair Mod</li>
         <li>Rimsenal - Rimhair</li>
         <li>[KV] Change Dresser - B18</li>
         <li>Children and Pregnancy - Testing v0.4e</li>
         <li>Mad Skills</li>
         <li>Pick Up And Haul</li>
         <li>While You're Up</li>
         <li>Just Ignore Me Passing</li>
         <li>Cut blighted plants</li>
         <li>Defensive Positions</li>
         <li>Predator Hunt Alert</li>
         <li>QualityBuilder</li>
         <li>AnimalCollabProj</li>
         <li>AnimalCollabProj ADS Patch</li>
         <li>Dinosauria</li>
         <li>GeneticRim b18</li>
         <li>GeneticRim Cosmic Horrors Patch</li>
         <li>GeneticRim Dinosauria Patch</li>
         <li>Clone Bay</li>
         <li>Mechanoids Extraordinaire</li>
         <li>Expanded Prosthetics and Organ Engineering</li>
         <li>Set-Up Camp</li>
         <li>OHU Ships</li>
         <li>[KV] Trading Spot - B18</li>
         <li>Remote Explosives</li>
         <li>More Vanilla Turrets [B18]</li>
         <li>More Furniture [B18]</li>
         <li>[KV] RimFridge - B18</li>
         <li>Fire Extinguisher [B18]</li>
         <li>Deep Ore Identifier</li>
         <li>Medical Training</li>
         <li>Quarry</li>
         <li>Children</li>
         <li>Sometimes Raids Go Wrong</li>
         <li>Prison Labor</li>
         <li>Hospitality</li>
         <li>Apparello 2</li>
         <li>[CP] Rimmu-Nation - Clothing (B18)</li>
         <li>Jecs Tobacco and Cigarettes</li>
         <li>Project RimFactory</li>
         <li>Industrial Rollers</li>
         <li>Mass Graves</li>
         <li>LT-DoorMat</li>
         <li>RT Fuse</li>
         <li>MiningCo. DrillTurret</li>
         <li>MiningCo. SpotlightTurret</li>
         <li>MiningCo. MiningHelmet</li>
         <li>MiningCo. MMS</li>
         <li>MiningCo. Spaceship</li>
         <li>Tribal Essentials [b18]</li>
         <li>Additional Joy Objects</li>
         <li>HolyWasher</li>
         <li>[CP] Retro Joy (B18)</li>
         <li>[T] MoreFloors</li>
         <li>[T] MoreBedsVanilla</li>
         <li>Doors Expanded</li>
         <li>Centralized Climate Control</li>
         <li>[sd] advanced powergeneration</li>
         <li>Stony campfire</li>
         <li>Wall Vitals Monitor</li>
         <li>【B18】Animal straw bed</li>
         <li>Fences And Floors</li>
         <li>[sd] round tables</li>
         <li>[RF] Basic Bridges [b18]</li>
         <li>Signs and Memorials</li>
         <li>Statue of Colonist</li>
         <li>Camping Stuff</li>
         <li>Expanded Roofing</li>
         <li>Roof Support B18</li>
         <li>Dirt Paths</li>
         <li>Glass+Lights</li>
         <li>[CP] Portable Power Generator (B18)</li>
         <li>Repair Workbench</li>
         <li>Animals Logic</li>
         <li>P-Music</li>
         <li>AllowDeadMansApparel</li>
         <li>Simple sidearms</li>
         <li>RunAndGun</li>
         <li>More Trade Ships</li>
         <li>More Sculpture</li>
         <li>Hand Me That Brick</li>
         <li>I Can Fix It!</li>
         <li>JTReplaceWalls [B18]</li>
         <li>[RF] Smooth Stone Walls [b18]</li>
         <li>Movable Sandbags</li>
         <li>Conduit Deconstruct</li>
         <li>Cheaper Components</li>
         <li>Stack Merger</li>
         <li>Accurate Mortars</li>
         <li>Efficient Light</li>
         <li>Realistic Rooms</li>
         <li>Various Space Ship Chunk [A18]</li>
         <li>Sparkling Worlds Addon - More Events [B18]</li>


[attachment deleted due to age]

Lawlzer

Just saying to anyone else trying to help: My world map also often looks like that, I'm playing on a ludonecrous (that spelling...) world, with 100% map size, though.
I'll check my mods and how much memory is being used, when I get home today.

TastyCookies

#2
Quote from: Lawlzer on May 22, 2018, 12:04:36 PM
Just saying to anyone else trying to help: My world map also often looks like that, I'm playing on a ludonecrous (that spelling...) world, with 100% map size, though.
I'll check my mods and how much memory is being used, when I get home today.

Does your game crash as soon as you see that? Also thanks for posting the same issue, we may both have a mod that can be the cause.

sadpickle

Well, I can tell you that the world map is not supposed to look like that. And it almost certainly has something to do with a mod or the order the mods are loaded. If you post the debug file (dev mode) someone might be able to tell you which one is causing the problem.

I have heard of people loading 200~ mods with no problems. However, the more mods loaded, the more important load order is to making them all play nice.

TastyCookies

Thanks for the advice, I have attached an output log for people to see. So it's not a memory related problem but a mod problem? I no longer crash when seeing the map glitch out like that but if I were to alt-tab out and back in, the game would still run but all I see is my desktop, I can still click and hear sounds but I don't know what I am pressing so clearly the game still works.

Lawlzer

Quote from: TastyCookies on May 22, 2018, 01:47:16 PM
Thanks for the advice, I have attached an output log for people to see. So it's not a memory related problem but a mod problem? I no longer crash when seeing the map glitch out like that but if I were to alt-tab out and back in, the game would still run but all I see is my desktop, I can still click and hear sounds but I don't know what I am pressing so clearly the game still works.
I apologize, I didn't see you say you crashed! My bad.
I don't ever crash, and I use a lot of mods, so I agree, it's almost definitely a mod "ordering"issue - I'll upload a debug file when I can.

TastyCookies

Quote from: Lawlzer on May 22, 2018, 02:07:15 PM
Quote from: TastyCookies on May 22, 2018, 01:47:16 PM
Thanks for the advice, I have attached an output log for people to see. So it's not a memory related problem but a mod problem? I no longer crash when seeing the map glitch out like that but if I were to alt-tab out and back in, the game would still run but all I see is my desktop, I can still click and hear sounds but I don't know what I am pressing so clearly the game still works.
I apologize, I didn't see you say you crashed! My bad.
I don't ever crash, and I use a lot of mods, so I agree, it's almost definitely a mod "ordering"issue - I'll upload a debug file when I can.
Thanks :)

So I ran some tests on Rimworld and I have found two definite instances where memory leaks occur. The first one is when you click on the mod menu and exit out of it, the application doesn't release the memory that was used to load it and if you keep on doing it, the game crashes. The second is if you load a save then exit to the menu, the game will still not release memory and if you keep doing it, the game crashes.

I don't know why Rimworld doesn't release any memory after initialization, my game upon startup uses about 2.7gb of ram already. I tried to reclaim the memory using RuntimeGC and while it did drop the memory usage down quite a bit (~700mb), the memory starts to be consumed a second after back to the original usage.

Correct me if I am wrong about those being memory leaks in the first paragraph, is that how the application works?

TastyCookies

Ok so I have been activating certain mods to see which one eats up more memory and so far the ones that do in my modlist are Zombieland which eats up about 300mb and Call of Cthulu and its expansions which eats up about 500mb. Adding all the other mods one by one with Call of Cthulu leads it to about 2gb so far. But once I got up to this point, upon clicking the mods button in the main menu, the memory consumption drops from 2gb to 1.6gb?!?! I am so confused on how Rimworld uses its memory, I have not activated all the other mods yet. Does this have to do with updating from A17 to B18? Maybe it is best if I just reinstall Rimworld and see what happens then.

P.S: This is the first time I touched Rimworld since 6 months ago. This is becoming a log for everyone who wonders what happens if you install alot of mods.

Canute

Do you think after you reinstall Rimworld handle the memory usage different ? Like a car which need less fuel after you dissamble, clean and reassamble the car ? :-)

If you use Rimworld B18 together with B18 mod, nothing should change.

Tober6fire

holy crap sorry I have never seen that many mods run on Rimworld (still enjoy the plain version of the game after a year or two  ;) ) also those snowflake patterns are cool shouldn't be there but cool.
I love stories and I hope that everyone try's to contribute in telling their stories as it is interesting and intriguing to see people connect through the tales they create.

TastyCookies

Does Rimworld even have a method of reducing memory usage? I'm curious, what is your memory usage when you start your game?

Canute

At my current game with this mods
https://git.io/vhZBx
i got 987 MB used. After using relcaim memory from RuntimeGC 969 MB.