Extreme lag with 57 mods?

Started by Fightera100, April 15, 2017, 10:40:08 AM

Previous topic - Next topic

Fightera100

Hey,

so I added 57 mods to Rimworld and for some reason, as soon as I start a new colony the frame rate drops to zero for a few seconds every 1 or 2 seconds. The game's usage of RAM also goes to 3 GB(which is completly fine for me but I just wanted to add that).

Output log after starting Rimworld:
https://gist.github.com/HugsLibRecordKeeper/8bdd4db049dd320a9403df8a47439d23

Output log after I created and loaded a new colony ingame:
https://gist.github.com/HugsLibRecordKeeper/5362b42d8f80315c9db754090fe19e2f

I can't read the output log to identify the mod that could cause problems. I started getting these errors with all those mods AFTER starting my first colony. I enabled dev mode ingame and now I get those errors.

PC specs:
i7 6700k
GTX 1070
16GB DDR4

Mods:
20th Century Weapons Mod (20CWМ)
AcEnhancedCrafting
Additional Joy Objects
ADogSaid-full A16
AllowTool
Better Pathfinding
Chemicals & Neutroamine
DeadMansClothing
DESurgeries-master
EdBPrepareCarefully
ED-Embrasures
ED-SafeTraps
Efficient Light
EPOE 2.0
Furnace
GlitterTech
Hospitality
HugsLib
ICanFixIt
IMTheWorkerNow
Infinity_Rim
Infused
LT_DoorMat
MadSkills
MineItAll
MiningCo.Alert Speaker
MiningShaftA16
MiningShaft-GlitterWorldAddon
MiningShaft-StoneAddon
MoreTradeShips
MountainMiner-master
Nandonalt - Camping Stuff
Nandonalt - Set-up Camp
OmniLocator (Wildlife tab i think)
Organ Thoughts
OrganizedResearchTab
Psychology
QualityBuilder
RealisticStarvationMod
RimFire 2.2
Rimsenal
Rimsenal_Federation
Rimsenal_Feral
Rimsenal_Hair
Rimsenal_Security
Rimsenal_Storyteller
Rimsenal_Vanilla
RT_Fuse
SillyBuilder
StackXXL
StackMerger
StepAway
Tech Advancing
TilledSoil
TradingSpotA16
Vegetable Garden 5.3
WM Medivac

HugsLib is the first thing that loads followed by hospitality and I put Psychology to the complete bottom

Would appreciate any help. I don't really want to check all of the 57 mods again :/

AngleWyrm

#1
Quote from: Fightera100 on April 15, 2017, 10:40:08 AM
so I added 57 mods to Rimworld and for some reason, as soon as I start a new colony the frame rate drops to zero for a few seconds every 1 or 2 seconds. The game's usage of RAM also goes to 3 GB.
...
Would appreciate any help. I don't really want to check all of the 57 mods again :/

I can help by offering the set of mods I use, because I'm not experiencing the lag-spike. From your list I've crossed off all the mods that are in my set to narrow down the problem. This is the list of mods that appear on your list but not on mine. Down to 36 mods.











20th Century Weapons Mod (20CWМ)AcEnhancedCraftingBetter PathfindingChemicals & Neutroamine
DeadMansClothingDESurgeries-masterED-EmbrasuresED-SafeTraps
Efficient LightEPOE 2.0FurnaceGlitterTech
IMTheWorkerNowInfinity_RimLT_DoorMatMineItAll
MiningShaft-GlitterWorldAddonMoreTradeShipsMountainMiner-masterNandonalt - Camping Stuff
Nandonalt - Set-up CampOmniLocatorOrgan ThoughtsRealisticStarvationMod
RimFire 2.2Rimsenal_HairRimsenal_SecurityRimsenal_Storyteller
RT_FuseSillyBuilderStackXXLStackMerger
StepAwayTech AdvancingTilledSoilWM Medivac



A testing method to avoid checking the whole set
This method of testing vastly reduces the amount of iterations for the cost of a small amount of tracking.

Split the remaining 36 mods into two sets. In a text editor, put a mark before each mod indicating what set it belongs to. So for example the text file might have entries like so:
[#1]RT_Fuse
[#1]StepAway
[#2]RimFire 2.2
[#2]TilledSoil
You can apply hunches and opinions when dividing the two sets into equal portions.

When you're done, disable all the members of set [#1]
  • If the lag spikes persist then all of the mods in set [#1] did not cause the problem and can be removed from the tracking text file.
  • If the problem vanishes, then the problematic mod is a member of set [#1], and all of the mods in set [#2] can be re-activated and then removed from the tracking list.

This method of divide and conquer should make testing 36 mods take at most six runs:
run #1: (18)(18)
run #2: (9)(9)
run #3: (5)(4)
run #4: (3)(2)
run #5: (2)(1)
run #6: (1)(1)
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Fightera100

Quote from: AngleWyrm on April 15, 2017, 11:59:38 AM
Quote from: Fightera100 on April 15, 2017, 10:40:08 AM
so I added 57 mods to Rimworld and for some reason, as soon as I start a new colony the frame rate drops to zero for a few seconds every 1 or 2 seconds. The game's usage of RAM also goes to 3 GB.
...
Would appreciate any help. I don't really want to check all of the 57 mods again :/

I can help by offering the set of mods I use, because I'm not experiencing the lag-spike. From your list I've crossed off all the mods that are in my set to narrow down the problem. This is the list of mods that appear on your list but not on mine. Down to 36 mods.











20th Century Weapons Mod (20CWМ)AcEnhancedCraftingBetter PathfindingChemicals & Neutroamine
DeadMansClothingDESurgeries-masterED-EmbrasuresED-SafeTraps
Efficient LightEPOE 2.0FurnaceGlitterTech
IMTheWorkerNowInfinity_RimLT_DoorMatMineItAll
MiningShaft-GlitterWorldAddonMoreTradeShipsMountainMiner-masterNandonalt - Camping Stuff
Nandonalt - Set-up CampOmniLocatorOrgan ThoughtsRealisticStarvationMod
RimFire 2.2Rimsenal_HairRimsenal_SecurityRimsenal_Storyteller
RT_FuseSillyBuilderStackXXLStackMerger
StepAwayTech AdvancingTilledSoilWM Medivac



A testing method to avoid checking the whole set
This method of testing vastly reduces the amount of iterations for the cost of a small amount of tracking.

Split the remaining 36 mods into two sets. In a text editor, put a mark before each mod indicating what set it belongs to. So for example the text file might have entries like so:
[#1]RT_Fuse
[#1]StepAway
[#2]RimFire 2.2
[#2]TilledSoil
You can apply hunches and opinions when dividing the two sets into equal portions.

When you're done, disable all the members of set [#1]
  • If the lag spikes persist then all of the mods in set [#1] did not cause the problem and can be removed from the tracking text file.
  • If the problem vanishes, then the problematic mod is a member of set [#1], and all of the mods in set [#2] can be re-activated and then removed from the tracking list.

This method of divide and conquer should make testing 36 mods take at most six runs:
run #1: (18)(18)
run #2: (9)(9)
run #3: (5)(4)
run #4: (3)(2)
run #5: (2)(1)
run #6: (1)(1)

Thanks for the detailed answer! I appreciate it. I found out that this mod: https://ludeon.com/forums/index.php?topic=31083.0 has some kind of memory leak. I enabled this one for test purposes and it lagged my game like hell and as soon as I opened the research tab it crashed. Thank you again!

AngleWyrm

The OrganizedResearchTab mod appears in both our collections, and so since I'm not experiencing the lag spikes there is probably a version difference between what I'm using and what you're using.

I tried version 1.1.2 beta of that mod and it crashed my game. The version listed as 1.0.2 stable is the one I'm using and it works like a champ.

The author of that mod is a skilled workman, but is still struggling with breaking up the workload into time slices. The last beta attempted to offload the chores into a separate thread instead of returning control after brief usage, which doesn't do anything for single CPU systems. It's not as easy as I'm making it sound; finding the loops that consume the most time and pausing to return from within them is complicated, and I wish him the best on his bug hunting and development.

The graphics from the beta are a step up, and I'd like to use it as soon as the time usage issues are resolved.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

SpaceDorf

Nice Info on the Testing method,

I am starting the lag hunt to. Because I get lags from 20h to 6h ingame time ..
which is quite annyoing .. I am not going to post my modlist here, because .. 57 is a third of the mods I use :-D

I am stuck on the question .. where can I turn on the FPS Counter ?
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

milon

FYI, more mods = more stuff the CPU has to do & track. Slow downs should be expected when you add more than a non-trivial amount of mods (depends on the user's PC & the mods in question, so YMMV).

Also, lag between 20h and 6h sounds like it's related to the speed boost that happens when all pawns are asleep.

FPS counter is a feature of Steam, so the option is in your Steam settings. I'm out of town this weekend, but I'm confident you can find it. :)

SpaceDorf

Well .. okay .. so no I won't have an FPS Setting then :-D

I expect Mod related slow down .. and have an eye on Perfomance killers.

But the nightly crawl makes the game nearly unplayable for me.
Because it really kills the vibe, and I don't get it .. the game runs fine for hours
and suddenly it does not .. the sun rises, so does the game speed ..
it's like playing quarter-speed ..

Can I turn this "boost" off somewhere ?

And yes, I allready have Zhentars Tweaks
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

AngleWyrm

Fraps benchmarking and video capture tool can provide an FPS overlay
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

SpaceDorf

Thanks for Fraps,

I don't think I actually need the FPS overlay to notice that my game slows down to a crawl ..

whats funny is that it is totally dependant on the ingame daytime ..
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

AngleWyrm

#9

Quote from: SpaceDorf on April 16, 2017, 09:27:48 AM
Nice Info on the Testing method,

I am starting the lag hunt to. Because I get lags from 20h to 6h ingame time ..
which is quite annyoing .. I am not going to post my modlist here, because .. 57 is a third of the mods I use :-D
57 x 3 = 171 mods.

The divide and conquer count of iterations can be calculated as
log2(collectionSize) = log(collectionSize)/log(2)

so for 171 mods, log(171)/log(2) = 7.4 tests
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

SpaceDorf

#10
Subtract 19 from your List :)

But I still think it is the performance "boost" at night .. not a mod ..

My Modlist is one which grows slowly piece by piece, so I notice quickly which mods have an impact on my performance and which don't ..

better pathfinding for instance does.
so does zenthars advanced visuals ..
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

AngleWyrm

#11

171 - 19 = 152 mods
So test count is log(152)/log(2)

= https://www.google.com/#q=log(152)/log(2)
= 7.2 tests.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

milon

Quote from: SpaceDorf on April 16, 2017, 09:46:37 AM
Can I turn this "boost" off somewhere ?

Not to my knowledge, no, but I believe it only happens when all pawns are asleep. You can try drafting a pawn (wakes them up) and see if the game runs smoother. If so, you could try having a colonist or two on night duty so that you never have them all asleep at the same time.

Keep in mind that time passes much faster during the boost. It *looks* slow, but the clock moves way faster. But if the game isn't responsive, You may want to try to avoid it as I suggested above.

SpaceDorf

#13
The game starts lagging, and I have a nightshift of two night owls. ( okay one, the other died earlier that year .. )

I think I may have found my culprit ( Rikikis Caveworld Flora )
But I am still waiting for night to come around again.

=====================================

24 ingame hours lag free with 187 remaining mods running

I will miss my glowing shrooms ..
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Fightera100

#14
So apparently after one or two hours of playing with my colony on the largest map and all the mods except the research one + 2  new ones, started to lag and I get FPS drops from 144FPS to 100 and sometimes to 60 or even 40(sometimes spikes sometimes a few seconds). You really feel the difference and I don't know which mod causes this. The ram usage of the game is +2GB. The problem is I don't know which mod of them is causing it though. Anyone has experience with that? I have a relatively powerful PC imo and I don't think it should run with a lot of FPS drops in the first summer(seeing that people sometimes play with the triple amount of mods).

Current Mods:
20th century weapons mod
AcEnhancedCrafting
ADditional Joy Objects
ADogSaid
AllowTool
Better Pathfinding
Chemicals & Neutoamine
DeadMansClothing
DESurgeries
EdBPrepareCarefully
ED Embrasures
ED SafeTraps
Efficient Light
EPOE 2.0
Furnace
GlitterTech
Hospitality
HugsLib
IcanFIxIt
ImTheWorkerNow
Infinity_Rim
Infused
JTReplaceWalls
LT_DoorMat
MadSkills
MapReroll
MineItAll
MiningCo Alertspeaker
MiningCo ForceField
Miningshaft + Glitterworld addon + StoneAddon
MoreTradeShips
Nandonalt Camping stuff + Set up Camp
Omnilocator
ORgan thoughts
psychology
QUalitybuilder
RealisticStarvationMod
ResearchLIst
RimFire 2.2
Rimsenal
Rimsenal Federation
Rimsenal Feral
Rimsenal Hair
Rimsenal Security
RImsenal Vanilla
RT Fuse
SillyBuilder
StackXXL
StackMerger
StepAway
Tech ADvancing
TilledSoil
Tradinspot
Vegetable Garden
WM MEdivac

Is it possible to form a caravan and go to a new place and abandon the old place to have a smaller map? I could imagine that the amount of plants is just too high

Edit:
Tested smaller map sizes and for some reason I already start with 80-90 FPS. It is really weird to play with that and it feels laggy...