UBOAT
[WIP 2025.1] U-Boat Expanded
Memory usage increases after every save
I'm not sure if this is related to Uboat Expanded, or one of the recommended mods on its page as those are the only I'm using, or whether this is an issue in Uboat itself.

Every time the game saves, the amount of memory used by the application increases by about 1GB and does not release. I did not notice this behavior before installing uboat expanded, so this is why I'm narrowing my investigation to mods. I know this behavior existed in older versions of vanilla Uboat, and perhaps I just never saved often enough in sessions to notice.

Regradless, even with an okay machine resource wise (32GB of RAM on win7), I was seeing over 20 GB of memory usage by Uboat after about an hour or two of play yesterday. I tested this morning and things started at around 14GB, but increased by a little over 1GB every save, and never freed again. at over 20GB, this started causing stuttering every few seconds.

Is this known behavior and due to the vanilla game, or are mods a potential cause? Again, I am only using uboat expanded, and the mods recommended by it on the workshop page, minus the TDC as it's a little more complex than I want to get right now.
< >
Showing 1-3 of 3 comments
I realize this mod adds a LOT of data and Uboat saves unneeded data in save files, but I'm not really seeing a performance or fps decrease when loading, per se. This is an issue of a memory leak or increased memory usage that does not release with every write to any save file. The stuttering is a freezing every 30 seconds or so and seems to be because RAM is getting capped and the swap file is coming into play. I've got an i7-8700k and like I said, 32GB of RAM. while this isn't the greatest hardware in the world anymore, it's not the worst considering hardware surveys. My CPU does get worked, but is not getting capped by any means. I meet the recommended for 1080p with a GTX 1060 6GB model. I doubt my GPU is being overrun.
Last edited by identifiedasbeingdisrespectful; Feb 9, 2022 @ 7:59am
link  [developer] Feb 9, 2022 @ 2:00pm 
I I suspect due to the steady interval of the stutter being 30 seconds that it is related to the garbage cleanup process in the game and unity which is scheduled to run every 30 seconds.

There could be issues in the game where data is not cleaned up efficiently or the garbage cleanup is inefficient in the way that it removes data.

Well it's possible for me to advise how to change the frequency of the garbage cleanup I cannot remove this process from the game in its entirety as it's required.

There's a data sheet in general xlsx tasks which defines the interval at which garbage clean up runs. Increasing this will allow the stutter to happen less frequently however it may be more pronounced. Inversely decreasing the interval at which this happens May deuce the stutter time however it will happen more frequently.

I will pass along this information as best I can to the devs
Thanks. It's almost as if the cleanup doesn't free the RAM it associates as garbage either, thus the ever increasing usage upon saving. I'll have to test without any mods active to see if it still creeps up in vanilla. Since the data usage is a lot less to begin with, I imagine it will take a lot more saving, which may be why I didn't notice before. I know those with 16GB or less had this issue with vanilla in an earlier patch version.
Last edited by identifiedasbeingdisrespectful; Feb 9, 2022 @ 3:28pm
< >
Showing 1-3 of 3 comments
Per page: 1530 50