3 ms·
Yeah don't get too excited, it's just a VM. The disk usage doesn't automatically shrink with usage, and I'm not sure if RAM does either (interested in knowing i
by mehrdadn 6y ago
Yeah don't get too excited, it's just a VM. The disk usage doesn't automatically shrink with usage, and I'm not sure if RAM does either (interested in knowing if they've done anything related to that), which were what I found most useful about WSL1. I wish they'd instead put all their effort from this into legitimately fixing the issues in WSL1 instead.
- mtzet 6y agoThe disk issue was probably going to be difficult to solve even with the WSL1 model if they wanted good IO performance. Using a proper Linux filesystem underneath is a decent compromise IMO. The RAM issue is a clear setback, and makes it annoying trying to do large compile jobs on the Linux side, though it's been a while since I've tried it. In theory it could be possible to handle coorporation between the Linux and Windows RAM usage patterns since they're running a very heavily modified kernel. I'd be very interrested in knowing if anything is hapenning on that front.
- gmueckl 6y agoIsn't Linux already capable of handing unused memory back to an underlying hypervisor? I vaguely remember that MS contributed code to support that kind of interaction with HyperV. Am I wrong?
- sz4kerto 6y agoThey do adjust memory reservation dynamically if I'm correct. It's very nice overall.
- patentatt 6y agoI think hyper-v does dynamically scale ram usage of vms, so it’s at least plausible that wsl2 does as well
- cesarb 6y ago> it's just a VM. The disk usage doesn't automatically shrink with usage That's possible in theory, I've done it with libvirt/KVM. You have to enable discard on all filesystems and swap on the guest, use a virtual disk interface which can pass the discard requests to the host, and configure the host to release the corresponding blocks on a discard request. I don't know if WSL2 comes configured to do all that, but if not, it shouldn't be too hard for them to add this functionality.
- mehrdadn 6y agoI imagine that could cause some awful fragmentation?