microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.41k stars 822 forks source link

Add msize configuration for windows-side 9P client (=higher WSL2 disk speed) #9125

Open BarsMonster opened 1 year ago

BarsMonster commented 1 year ago

There is a continuous effort to improve performance of 9P connections in WSL2. If we can resolve it at least for bulk transfers - half of the problem would be gone. Key to this msize configuration on 9P client. On linux side msize is configurable in fstab, but it seems to be not configurable in windows 9P client.

Suboptimal msize might reduce transfer speed for large file transfer (currently I see 400Mb/s through 9P down from native 4.5Gb/s achievable under Linux in WSL2)

Solution Registry config is added for 9P client on windows side. At least msize is configurable.

Describe alternatives you've considered Increase of existing hardcoded msize to 1-32Mb. Automatic msize? Or more documentation how 9P client works / configured.

Additional context Impact of msize to performance: https://wiki.qemu.org/Documentation/9psetup#Performance_Considerations_.28msize.29 Here others set default values to 1-32Mb : https://github.com/lxc/lxd/issues/10219

BarsMonster commented 1 year ago

Tried to increase default msize on Linux Kernel side from 128kB to 2Mb - did not helped (\net\9p\client.c). I afraid it's enforced on windows size.

bbsan2k commented 5 months ago

Is there any plan to implement this any time soon?