Resolved Memory leak: RAM does not unload after simulation (battles, visiting cities, villages etc.)

Users who are viewing this thread

Memory leak: RAM does not unload after simulation (battles, visiting cities, villages etc.)
How to Reproduce
: Record ram usage while entering/exiting several battles, see media.
Media:
Applies to versions
Public:
e1.0.5 - e1.0.10
Beta: e1.1.0
Alpha: n/a
Computer Specs
OS: Windows 7 ultimate SP1 (Issue confirmed on windows 10 as well)
GPU: GeForce GTX 970
CPU: AMD FX(tm)-8350 Eight-Core Processor 4.00 GHz
RAM: 16,0 GB
Motherboard: GA-990FXA-UD3 (rev. 3.0)
Storage Device (HDD/SSD): Both, Bannerlord is stored on a SSD

Conclusion: It should be quite clear at this point; the ram usage is increasing every time a scenario (battle, village, town, castle (tavern?) etc) is loaded but the RAM does not necessary decrease afterwards. Once all available RAM is used up other applications gets affected and some ram gets moved into the "swap file" or virtual RAM which greatly decreases overall performance for all applications moved here. This isn't a huge deal in of itself right now, the game slows downs a bit from time to time/stutters but nothing worse than that. Other applications running in the background gets less priority by the OS once ram gets sparse so alt+tabbing to other things while running the game is a no go, it takes about 30 seconds to 1 minute before you get any response from whatever you tabbed to. This is also quite noticeable for some time after the game has been closed.

Thanks to AgentX2006 who looked into Ram usage with a 3:rd party application and confirmed my conclusions:
Yeah I used RAMMap to take a look and see what all was being cached in RAM and it's basically everything. I think it's being loaded in such a way that windows doesn't know it's OK to unload it. The longer the game is running and the more assets it calls on and loads in the worse it gets. I have 16GB of RAM and the game has used up all of it on me (commit size of 12GB). This forces the normal OS stuff that is cached in there on standby into the pagefile on your HDD which is way way way slower than RAM which is why the whole computer bogs down and runs like garbage even after the game is closed. Once you start doing other things it starts moving it from the pagefile back into RAM but that takes a few minutes.
 
Last edited:
I can see that in game too

I have 8gb of ram, At the start the game is smooth, i can play with medium/high setting on custom battle, at 100vs100 without prob

When i starting the campaign, it's the same, some of loading are a bit long and laggy but in game it"s pretty smooth

After 15/30m of gameplay it"s start to freeze, more and more, everywhere, even in the map, after 1h i try to restart a custom battle and that was laggy as the campaign compare to the first at the game start

At the point that he affect the speed of my whole computer if i push the gameplay 2h (Freeze of 5m for left the game for exemple)
 
I can confirm this.

Also, important variables also do not unload. This leads to stored variables form quests of one saved game being carried over to other saved games, with consequences in the quests...
 
I can see that in game too

I have 8gb of ram, At the start the game is smooth, i can play with medium/high setting on custom battle, at 100vs100 without prob

When i starting the campaign, it's the same, some of loading are a bit long and laggy but in game it"s pretty smooth

After 15/30m of gameplay it"s start to freeze, more and more, everywhere, even in the map, after 1h i try to restart a custom battle and that was laggy as the campaign compare to the first at the game start

At the point that he affect the speed of my whole computer if i push the gameplay 2h (Freeze of 5m for left the game for exemple)
Same issue
1060 6gb
ryzen 5 1600
8gb ram
 
I can see that in game too

I have 8gb of ram, At the start the game is smooth, i can play with medium/high setting on custom battle, at 100vs100 without prob

When i starting the campaign, it's the same, some of loading are a bit long and laggy but in game it"s pretty smooth

After 15/30m of gameplay it"s start to freeze, more and more, everywhere, even in the map, after 1h i try to restart a custom battle and that was laggy as the campaign compare to the first at the game start

At the point that he affect the speed of my whole computer if i push the gameplay 2h (Freeze of 5m for left the game for exemple)

Same here as well. Latest patch messed performance up completely.
 
Not sure if this RAM issue is for win 7 only or win 10 as well. If someone with windows 10 confirms this issue I'll add that to the tags as well
 
Not sure if this RAM issue is for win 7 only or win 10 as well. If someone with windows 10 confirms this issue I'll add that to the tags as well

Yup i confirm, i have windows 10 and i have the problem too ^^
I talk with a dev here if you want Dratgon, using you screen for exemple

Dont know if it's the same leak as you but it's seems so, on the fact that the game become more and more laggy for me
 
Yup, I've got almost the same exact setup as you and seemingly the same problem. Same motherboard, same amount of RAM, same operating system, only differences are that I've got an AMD-4170 Quad-Core 4.2GHz, a Radeon R9 380, and only HDDs. After about 30-60 minutes of playing, it completely locks up my system. No blue screen, no crash, just using so much of my RAM that literally nothing else can operate.
 
Yeah I used RAMMap to take a look and see what all was being cached in RAM and it's basically everything. I think it's being loaded in such a way that windows doesn't know it's OK to unload it. The longer the game is running and the more assets it calls on and loads in the worse it gets. I have 16GB of RAM and the game has used up all of it on me (commit size of 12GB). This forces the normal OS stuff that is cached in there on standby into the pagefile on your HDD which is way way way slower than RAM which is why the whole computer bogs down and runs like garbage even after the game is closed. Once you start doing other things it starts moving it from the pagefile back into RAM but that takes a few minutes.
 
Yup i confirm, i have windows 10 and i have the problem too ^^
I talk with a dev here if you want Dratgon, using you screen for exemple

Dont know if it's the same leak as you but it's seems so, on the fact that the game become more and more laggy for me
Thanks I'll add the tag (edit: dosen't seem to be possible, I'll edit my post i stead). You can reference to images or this posts, that is okay!

Yeah I used RAMMap to take a look and see what all was being cached in RAM and it's basically everything. I think it's being loaded in such a way that windows doesn't know it's OK to unload it. The longer the game is running and the more assets it calls on and loads in the worse it gets. I have 16GB of RAM and the game has used up all of it on me (commit size of 12GB). This forces the normal OS stuff that is cached in there on standby into the pagefile on your HDD which is way way way slower than RAM which is why the whole computer bogs down and runs like garbage even after the game is closed. Once you start doing other things it starts moving it from the pagefile back into RAM but that takes a few minutes.
We came to the same conclusion then :smile: (read page 19 in media)
 
Last edited:
Thats one workaround. What about software? Do any of you young guys know of any free software that will regularly clear your RAM cache whilst playing? I know Orbital Advanced System Care does it, but only the Pro version. As a temporary workaround there must be some software out there that will clear the RAM for us. I've tried Razor Cortex but it doesnt load for me, so cant say if it works.
 
You have this thread boys if you want try to solve the problem on your own

But i do many of this things, and he just extend the time, they don't solve the probs (I can play 1h beside 30m before all getting freezy) (For me i done Pagefil modification, Steam no browser, Disable audio enhancement,Optimize game settings and Process lasso, but have memory cleaner that i don't try for exemple, and other stuff)
 
@Elthors Only the devs can really solve it.

Is there are workaround to this for the time being? Lets get our heads together

Restart the game completely every 5-10 minutes. I personally have to save my game before every major battle, shut it down and then reload it. Otherwise my fps drops from smooth to critically low as soon as i engage the enemy (even if it's just 4 npcs in total)
 
Back
Top Bottom