WSL2 on limited RAM: vmIdleTimeout=-1 still suspends instances, and memory isn't released — best practice for a many-long-lived-process workload? #41081
Unanswered
iszzu80-dev
asked this question in
Q&A
Replies: 1 comment
|
For 1. For 2. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Running a workload of ~13 long-lived Node.js processes (an AI-agent system) inside a single WSL2 distro on a 16 GB Windows host (WSL sees ~7.4 GB usable). Two related problems — hoping others have hit these and found a supported approach.
1. Keep-alive / suspend.
%USERPROFILE%\.wslconfighas:…yet instances/services still get suspended after a while (matches the reports in #13291 and #8659). Our current workaround is a PowerShell loop that keeps a process alive. Is there a supported way to keep a long-running server-style workload alive, or is the keep-alive loop still the accepted answer? Does adding
instanceIdleTimeout=-1under[general]alongsidevmIdleTimeout=-1help?2. Memory pressure. WSL2 doesn't release RAM back to Windows, so
MemAvailablecreeps down and eventually the Linux OOM killer fires — which on our low-RAM host has cascaded into host-side instability. We're mitigating with:Questions:
autoMemoryReclaim=gradualthe current best practice, and does it interact badly with the suspend / keep-alive behavior above?swap/memorysizing rule of thumb for this kind of workload?Thanks. Kernel is 6.x microsoft-standard-WSL2; happy to share more detail.
All reactions