Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can verify some of this by examining a lot of the running memory bloat in https://live.sysinternals.com/procexp.exe (official diagnostics tool by sysinternals, a microsoft subsidiary), just make sure to elevate to see full process info with 'show details on all processes'.

On my machine a bunch of UWP apps are loaded passively in the background. A few are UWP apps I use occasionally, a few aren't. I don't know what heuristic they use for this. You might look at that and go - hey, wasted memory and CPU! However:

These apps are fully suspended, so they can't use any CPU at all. You can observe this in the procexp CPU column. Because they are fully suspended the OS can also instantly evict them when it detects memory pressure, similar to how the page caching system in OSes retains cached file contents in scratch memory to speed up I/O - if the memory used for caching files is needed for applications, the cache will be evicted to make space. Cortana, for example, is using 180mb of RAM for me right now but it is fully suspended so it can be evicted immediately to make room for another app. The upside is that when I hit start and begin typing Cortana search responds immediately.

The downside to this automatic eviction setup for background apps is that they will show up in memory usage statistics even though they're not really tying up that memory. It makes your system's available RAM a bit misleading. There are other modern apps that also respond to memory pressure - I believe Firefox will automatically compact its memory, you can manually trigger that in about:memory to see what it does.

I can also confirm that increasing the amount of RAM in my machine increased how much of it Windows was willing to use for preloading apps and caching pages, but I feel like that's not surprising.



Doesn’t this become an issue when your memory intensive apps close? Because after being evicted, wouldn’t Cortana and all the other stuff need a second to be reloaded into memory?


Yes, but the effect is the same as if files were evicted from the page cache: They get reloaded from disk when next used. Better for cortana to take an extra 750ms to load than for your other app to run out of memory.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: