microsoft / WSA

Developer-related issues and feature requests for Windows Subsystem for Android
MIT License
1.52k stars 834 forks source link

WSA consumes massive amounts of RAM and doesn't return it #504

Open RuneCE opened 8 months ago

RuneCE commented 8 months ago

Steps to reproduce

Launch any application and keep it running for an extended period of time.

System Build

Windows Build: 23H2 - 22631.2861

Short Explanation

I am using AWS casually, and then it started using huge amounts of my Memory (RAM) after a while, I have 64 GBs of RAM and I am seeing it gradually consume more and more of my RAM, it will likely reach 100% within a few hours, it refuses to release any of the memory unless I shutdown WSA.

✔️ Expected Behavior

WSA should be managing memory usage, it should not continuously consume an far too much of my system memory. Memory that is no longer in use should be released back to my system.

❌ Actual Behavior

After launching an application in WSA and keeping it running for an extended period of time, WSA starts to consume far too much of my RAM. It continues to take more and more and it does not release the memory whatsoever, even when there seems to be no active use that would justify the high memory consumption... it is leading it to take up almost all of the available memory I have.

Screenshot 2024-01-10 043244 Screenshot 2024-01-10 034244

Other Software

No response

Please specify the version of Windows Subsystem for Android

2310.40000.2.0 Edit: same thing happens on 2311.40000.5.0

LPFchan commented 5 months ago
SCR-20240406-owof

When left on its own, WSA (due to this issue) will fill up the entire available system memory, and eventually crashes the entire computer (several times at this point, leaving the '2004' Resource-Exhaustion-Detector event on the log) It's pretty inconvenient that I need to clear out the RAM regularly by shutting down and restarting WSA just to get the system running without BSoD.

Task Manager reports Vmmem as the problematic process and I'm on the version 2311.40000.5.0 This behaviour is agnostic to the "Memory Allocation" settings from the WSA preferences. (Mine is set to the default 6GB, and yet fills the entire 48GB of RAM)

Slion commented 5 months ago

I never looked into RAM consumption myself but I can leave WSA apps running for days without such issues. Though I think I granted WSA lots of RAM to start with.

LPFchan commented 5 months ago
SCR-20240407-nlid SCR-20240407-nllz

👆 WSA eating up more than 6GB of RAM it was granted in the settings