Cities: Skylines

Cities: Skylines

View Stats:
Help with memory issue
Overnight, my game seems to have gone wonky with memory usage, and I have no idea why.

No mods or assets enabled (a few mods subscribed to, maybe a dozen or so), all expansion DLCs, some but not all content creator packs & radio stations.

Playing one of the scenarios, small town with ~5k population.

Very basic stuff. Nothing taxing. Wasn't having any issues yesterday.

When I tried playing today (didn't do anything strange to my computer in between... I just slept, basically), all of a sudden, the game is using a massive amount of memory and I have no idea why.

Reading through the forum, I've noticed that it's recommended to assign a bigger pagefile. Alright. I read this guide:

https://steamcommunity.com/sharedfiles/filedetails/?id=2114415052

And I subscribe to and enable this mod, to see how much I'm using before I change my pagefile:

https://steamcommunity.com/sharedfiles/filedetails/?id=1804882663

Result:

https://steamcommunity.com/sharedfiles/filedetails/?id=2533993555

Seems pretty reasonable, but since the pagefile change seems to be recommended anyway, I go ahead and change that.

I've got 16gb of RAM, and windows is recommending 24gb of pagefile, so that's what I set it to, restarted my computer, tried the game again...

And nothing changes.

Looking at resource manager, here's how my RAM usage looks while the game's running:

https://i.imgur.com/GqVSGQx.png

And here's how it looks when the game's not running:

https://i.imgur.com/ivCnNjw.png

It seems that the game's using ~6gb of actual RAM, and that's just fine, but then it seems to also be using nearly an extra ~6gb of "modified"? Not sure what that means, but that seems odd to me, and potentially the source of my problem.

Though it's theoretically possible this was happening yesterday and I simply hadn't noticed, I highly doubt that, as my game was running smoothly yesterday, and it rather feels like there's a noticeable difference now.

I haven't played extensively to test that, though, because I don't really feel comfortable running the game for an extended period of time right now.

I've tried looking this up (both on this forum and in a general internet search), but I haven't found anything that seems it could help or be relevant.

Anybody have any ideas?
< >
Showing 1-15 of 23 comments
MaxFX Jul 1, 2021 @ 3:12pm 
Here's an indication of the amount of RAM used by the game when DLC's, assets and mods are added:

8GB RAM: 100 assets, 5 mods, 1-2 DLCs
16GB RAM: 500 assets, 20 mods, 5-10 DLCs
32GB RAM: 2000 assets, 50 mods, 15 DLCs
64GB RAM: 4000 assets, 100 mods, All DLCs

(source:) https://steamcommunity.com/sharedfiles/filedetails/?id=465790009

I do not know what caused your game to run less smoothly if nothing has changed in the amount of DLC's and assets used.

I had a lot of subscribed assets 'disabled' in the content manager. Earlier this week an update was performed by Paradox. After the update all these assets were 'enabled' again. This lead to an increase of RAM usage. Maybe this has happened to you as well? Only thing I can think of...
Last edited by MaxFX; Jul 1, 2021 @ 3:12pm
Elegant Caveman Jul 1, 2021 @ 3:37pm 
Originally posted by MaxFX:
Here's an indication of the amount of RAM used by the game when DLC's, assets and mods are added:

8GB RAM: 100 assets, 5 mods, 1-2 DLCs
16GB RAM: 500 assets, 20 mods, 5-10 DLCs
32GB RAM: 2000 assets, 50 mods, 15 DLCs
64GB RAM: 4000 assets, 100 mods, All DLCs

(source:) https://steamcommunity.com/sharedfiles/filedetails/?id=465790009

I do not know what caused your game to run less smoothly if nothing has changed in the amount of DLC's and assets used.

I had a lot of subscribed assets 'disabled' in the content manager. Earlier this week an update was performed by Paradox. After the update all these assets were 'enabled' again. This lead to an increase of RAM usage. Maybe this has happened to you as well? Only thing I can think of...

Thanks.

I've got a couple dozen DLC, and a dozen mods, no assets; I've checked, all the mods are disabled.

What confuses me most is that everything was fine last night, and today it's not.

I've done a few more tests...

The game's fine up to the main menu, it's when I get into a map that things get weird.

I was playing "City of Gardens" scenario, but I tried a different scenario, and a brand new vanilla map, and the same issue persists in all cases.

I also tried playing a bit to see if there was something clearly wrong that I wouldn't have missed yesterday, and... yeah:

https://steamcommunity.com/sharedfiles/filedetails/?id=2534047703

No idea what that blue on roads is. Basically textures not loading, which does load as I get closer. If I move away, it gets blue again.

Finally, I've tried unsubscribing from all my mods, just to be sure... and yes, the issue's still there.
db48x Jul 1, 2021 @ 3:58pm 
You didn’t actually say what “issue” you are experiencing.

You talked a lot about memory, but then show memory usage numbers that are entirely normal and do not in any way indicate a problem. You said that “the game is using a massive amount of memory”, but then you show it using just 6 gigabytes. Why do you think that this is a massive amount, and why do you think it is so much larger than what the game normally uses? Worse, you’re looking at summary numbers for your whole computer rather than numbers for individual programs.

Also, using a page file does not reduce the amount of memory in use, nor would you want it to. The purpose of virtual memory is to provide an escape hatch in case your run a program which requires more memory than you have. The program will run far slower when using virtual memory than it would if you had the right amount of physical memory, but it will still run.
Elegant Caveman Jul 1, 2021 @ 4:21pm 
Originally posted by db48x:
You didn’t actually say what “issue” you are experiencing.

The issue I'm experiencing is that it's using tons more memory than it did yesterday. Apologies if that wasn't clear.

It's nearly maxing out my RAM, which I've never seen happen before.

Originally posted by db48x:
You talked a lot about memory, but then show memory usage numbers that are entirely normal and do not in any way indicate a problem. You said that “the game is using a massive amount of memory”, but then you show it using just 6 gigabytes.

It's using ~12gb, and that's my issue.

The green bar is ~6gb, which is what I'd expect it to use, and feels consistent with my experience until now.

The yellow bar ("modified memory") is an extra 6gb, and that goes away when I close the game, so it's clearly something to do with the game. This is what seems to be the issue.

I haven't looked at resource manager while playing before, so I can't be certain (hence why I'm asking if anybody has any idea about any of this), but with what I've read and tested, that seems to be where the issue lies.

Originally posted by db48x:
Worse, you’re looking at summary numbers for your whole computer rather than numbers for individual programs.

Those screenshots were taken while the game was running, and then again as soon as I closed it, which is when "modified memory" went away.

I cropped those screenshots simply to highlight the difference in "modified memory" while the game was running compared to when it was not.

While the game was running, it was listed in the actual processes as only using ~6gb, which fits with the green bar.
Last edited by Elegant Caveman; Jul 1, 2021 @ 4:22pm
db48x Jul 1, 2021 @ 5:26pm 
You have 16gb of ram, so letting the game use 12gb is not a problem; it’s not anywhere near “maxing out” your memory. It’s not a symptom of a problem either.

Originally posted by Elegant Caveman:
I haven't looked at resource manager while playing before, so I can't be certain (hence why I'm asking if anybody has any idea about any of this), but with what I've read and tested, that seems to be where the issue lies.

Your problem then is that you saw a big number for the first time and thought it was unusual. This is a form of hypochondria.

The memory graph you are looking at is not very helpful, primarily because it doesn’t explain anything, but also because it is badly designed. You don’t need to worry about anything until the Available+Cached numbers go below about 200 MB. Available memory is memory that is not currently being used by anything, and Cached is the memory being used for cached files. Any file that any program on your computer is reading and/or writing will be cached so that future accesses to the file will be faster. When available memory gets low, the OS will discard information from the caches so that programs can use it instead. Since those two numbers add up to 8GB in your screenshot, you should think of your memory as being half free. You can subscribe to a lot more assets without any memory problems.
Elegant Caveman Jul 1, 2021 @ 5:49pm 
Originally posted by db48x:
You have 16gb of ram, so letting the game use 12gb is not a problem; it’s not anywhere near “maxing out” your memory. It’s not a symptom of a problem either.

The screenshot with the game running shows 9344 MB "in use" and 5955 "modified", for a total of 15299 MB.

I'd call that pretty close to "maxed out". Does "modified" not count?

With the game not running, that drops to 3608 MB "in use" and 342 MB "modified", for a total of 3950 MB.

Is that not a huge difference?

I have a desktop widget that lets me monitor CPU load & temps as well as RAM usage, and it was showing a ~93% RAM use.

Considering this, it sounds like the ~6gb of "modified" is "in use" somehow.

I would expect a cache buffer to be more under "standby", but I really don't know anything about that. I tried looking up explanations of "modified" vs. "standby", but I guess I'm too dense to understand.

I'm pretty sure I've never seen it go that high, and I'm almost certain it wasn't like that when I was playing yesterday. I did alt-tab out of the game multiple times yesterday, and I tend to keep an eye on it.

I can't say with absolute certainty it wasn't that high yesterday, but nearly.

That said...

Originally posted by db48x:
Your problem then is that you saw a big number for the first time and thought it was unusual. This is a form of hypochondria.

I'm sorry, but this is more than just "Oh no, big number scary!".

The numbers are my best attempt at trying to make sense of what's happening, but the game is being directly affected.

I first noticed the issue because the game lagged/had bit of a freeze-up when loading the game (which wasn't happening yesterday), which made me notice the 93% use.

I'm almost positive that's new, but even if it's not, the game is behaving in strange ways. In case you missed what I said above:

Originally posted by Elegant Caveman:
https://steamcommunity.com/sharedfiles/filedetails/?id=2534047703

No idea what that blue on roads is. Basically textures not loading, which does load as I get closer. If I move away, it gets blue again.

EDIT: Searching for "blue roads", that appears to be a known bug with memory issues.

Just tried the game again, and the blue's gone for now, so I guess it's intermittent. Still points to an overall memory issue, though.
Last edited by Elegant Caveman; Jul 1, 2021 @ 6:04pm
MarkJohnson Jul 1, 2021 @ 8:08pm 
You are not having any issues whatsoever.

Windows is in control of memory, and it keeps things in RAM whenever it runs, so it has files it needs immediately, instead of closing and opening files constantly.

This should have been the same all along. This should have happened yesterday and everyday that you have played this game. Unless you purchased your DLC and subscribed all your workshop just yesterday.

If you have other apps running, it will use up more RAM as well. Browser windows, music apps, photo apps, etc.

Once RAM starts getting full, it will start closing unimportant files that aren't being used, and moving important files it needs to the page file to clear way for more things to load in RAM.

As an example: I own all DLC except the newest two CCPs. On a fresh install of windows and a new empty game map started, it uses roughly 24 GB total memory. Windows uses roughly 3-4 GB by itself, All DLC add up to around 17GB. But the game is only using 7 GB in task manager (Cities.exe file).

Maybe you should use Windows own built-in Task manager to track your memory. It is much clearer to see. Just go to processes and them memory sidebar, to see all relevant info.

But your system is behaving normally.

But if all you are noticing is RAM numbers, then you are not looking in the right place. As I said, windows will swap apps in and out of RAM a lot, sometimes by 7-8 GB at a time. so it can drop 8Gb and raise 8GB on a whim and at anytime that windows deems necessary.
Elegant Caveman Jul 1, 2021 @ 9:08pm 
Originally posted by MarkJohnson:
This should have been the same all along. This should have happened yesterday and everyday that you have played this game.

Should, yes. But that's exactly it.

I'm almost certain that's not the case.

Maybe it is? And I'm just losing my mind? I guess that's also a possibility.

Originally posted by MarkJohnson:
Maybe you should use Windows own built-in Task manager to track your memory.

Checked that, and task manager matches the green line ("in use") from resource monitor, being around ~6gb. Which, again, is something I'd be fine with and would consider normal.

My issue, again, is with that EXTRA ~6gb from "modified", which I'm pretty sure is new.

And I'm not sure you know what resource monitor is? It's also part of windows, not some random third-party program. I accessed it from task manager.



In other news, I tried playing again... it mostly seems to be working fine, though still using a lot of ram.

On top of the strange blue streets-that-don't-load, I also saw... well, hard to explain... empty lots, I guess?

https://steamcommunity.com/sharedfiles/filedetails/?id=2534225165

Zooming in, the buildings render, and the streets go blue. Moving around removes the blue, then it comes back. Zooming out, and the buildings disappear again.

If I reload my save from within the game (as opposed to from the main menu), these graphical glitches go away.

Still, rather strange stuff.
Last edited by Elegant Caveman; Jul 1, 2021 @ 9:09pm
MarkJohnson Jul 1, 2021 @ 10:27pm 
Originally posted by Elegant Caveman:
Checked that, and task manager matches the green line ("in use") from resource monitor, being around ~6gb. Which, again, is something I'd be fine with and would consider normal.

The, "in use" number is the amount of RAM being used.

My issue, again, is with that EXTRA ~6gb from "modified", which I'm pretty sure is new.

I'm not sure what program you are using that reports modified, but it should be your, "Virtual Memory" that is your RAM plus your system managed, "Page File". So, 6GB of RAM, plus 6GB of swap file = 12GB of memory total (12GB of Virtual Memory)

And I'm not sure you know what resource monitor is? It's also part of windows, not some random third-party program. I accessed it from task manager.

I never seem to use resource monitor. Task manager has everything. If I need more info, then resouce3 monitor is linked in task manager.

And I googled it, and Modified stat means page file usage.

So, "In use" is RAM (cities.exe and other executable files) and Modified is the page file (All of the workshop that was removed from RAM free for other important tasks)

So, all of your numbers are as they should be, and should have always been. My guess is that you had some other app running and it inflated memory and that was when you noticed it enough to investigate it.

Here's the link on resource monitor if you care to take a look at it sometime.
https://www.techrepublic.com/article/how-to-use-windows-10s-resource-monitor-to-track-memory-usage/
Elegant Caveman Jul 2, 2021 @ 12:02am 
Originally posted by MarkJohnson:
I'm not sure what program you are using that reports modified, but it should be your, "Virtual Memory" that is your RAM plus your system managed, "Page File". So, 6GB of RAM, plus 6GB of swap file = 12GB of memory total (12GB of Virtual Memory)

Sorry, I'm an idiot and said "resource manager" in my first post; I meant "resource monitor". That's where I got the screenshots and "modified" from.

Good to hear it's just virtual memory/page file, thank you.

Originally posted by MarkJohnson:
I never seem to use resource monitor. Task manager has everything. If I need more info, then resouce3 monitor is linked in task manager.

It's something I rarely bother with myself, usually sticking to task manager, but this situation weirded me out enough that I figured I might as well see if I could get more information from resource monitor, and that big chunk of "modified" threw me off.

Here's what the desktop widget I use looks like when I load a map in the game:

https://i.imgur.com/MP1K5XH.png

I happened to notice it because the game seemed to lag when loading, which made me take notice. Seeing that worried me.

I'm guessing that what's happening is that the widget is counting "modified" as "in use" (something which it doesn't do with "standby").

So though only "in use" counts as "actual RAM, the big jump in "modified" caught my attention.

The game does seem to "calm down" a bit after some time (maybe a few hours? I wasn't exactly paying attention to the time); I noticed the total load on the widget go down to "only" around ~80%.

Interestingly, in resource monitor, "modified" had dropped down to only ~1gb or so, and most of it had gone to "in use", which was around ~10-11gb.

I guess it makes sense that more is cached/virtual upon first loading, and as the game finds its rhythm and see what it needs to use and not, that decision gets "solidified".

I'm still staggered by how a simple little town of ~6k would need over 10gb of RAM. That's pretty crazy...

Originally posted by MarkJohnson:
My guess is that you had some other app running and it inflated memory and that was when you noticed it enough to investigate it.

I only had the game, Steam, and my browser open, with music playing on youtube. Exact same thing as yesterday. I was even listening to the same music/video, and no new other tabs open on my browser that weren't there yesterday as well.

Originally posted by MarkJohnson:
Here's the link on resource monitor if you care to take a look at it sometime.
https://www.techrepublic.com/article/how-to-use-windows-10s-resource-monitor-to-track-memory-usage/

Thanks, I'll take a look later.
MarkJohnson Jul 2, 2021 @ 12:13am 
Originally posted by Elegant Caveman:
I'm still staggered by how a simple little town of ~6k would need over 10gb of RAM. That's pretty crazy...

This is because the game loads everything into memory, then fetches it when it is needed. So all DLC gets loaded into memory, plus all workshop as well.

Then as you fill in the map, it uses even more memory as your city grows. Not by a huge amount or anything. but it is noticeable.
Elegant Caveman Jul 2, 2021 @ 12:34am 
Originally posted by MarkJohnson:
Then as you fill in the map, it uses even more memory as your city grows. Not by a huge amount or anything. but it is noticeable.

I'm worried about how things might look later, if it needs this much starting out.

I've just started playing again after not touching the game for many years, and I've bought quite a bit of DLC since, so I might be in for a bad surprise, I guess...
MarkJohnson Jul 2, 2021 @ 12:59am 
Originally posted by Elegant Caveman:
Originally posted by MarkJohnson:
Then as you fill in the map, it uses even more memory as your city grows. Not by a huge amount or anything. but it is noticeable.

I'm worried about how things might look later, if it needs this much starting out.

I've just started playing again after not touching the game for many years, and I've bought quite a bit of DLC since, so I might be in for a bad surprise, I guess...

You should be fine if you take it easy on the workshop.

Like I said earlier, everything get loaded into memory, so most of it ends up on the page file (your drives) not in RAM. Just be picky on the workshop and you should be fine.
Elegant Caveman Jul 2, 2021 @ 1:08am 
Originally posted by MarkJohnson:
Like I said earlier, everything get loaded into memory, so most of it ends up on the page file (your drives) not in RAM. Just be picky on the workshop and you should be fine.

Ah, that's good to hear, thanks.

I guess I expected city size to have more of an impact.
db48x Jul 2, 2021 @ 3:21am 
You’re still looking at the totals, and not the numbers specifically for the Cities: Skylines process. I don’t use Windows, but I checked some screenshots online and I see that all of the running processes are shown above the graph you took a screenshot of. Sort it by the Working Set and Cities: Skylines should sort to the top; it is perfectly normal for it to be the largest user of memory while it is running. Your web browser will probably be next in the list.

You will probably see that Cities: Skylines is using a lot less memory than you expected, because a fair amount of the memory in use is files cached and other applications. Cached files represents memory that the OS could give to Cities: Skylines whenever it asks for more memory, and you can exit other applications such as Steam or your web browser to free up that memory if you need it.

If you have any questions about the numbers you see here, post a screenshot of the whole resource monitor window, with Cities: Skylines visible in the process list.
< >
Showing 1-15 of 23 comments
Per page: 1530 50

Date Posted: Jul 1, 2021 @ 2:48pm
Posts: 23