microsoft / Windows-Sandbox

Disposable, secure and lightweight Windows Desktop Environment
https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview
MIT License
364 stars 49 forks source link

Improve performance of mapped folders or suggest an alternative #60

Open lostmsu opened 3 weeks ago

lostmsu commented 3 weeks ago

Suggested new feature or improvement

On all my machines it seems that file I/O on the mapped folders inside Windows Sandbox is limited to about 12 megabytes per second. Host can access the same file at over 1 gigabyte per second (it is an NVMe SSD), e.g. almost 100x slower.

Scenario

I use host folders as persistent cache that can be kept between Sandbox launches.

Additional details

It would be nice to be able to share memory between the host and the Sandbox, maybe also pipes.

I hoped that would already be possible when I mmap a file from mapped folder, but as mentioned above the performance is very bad.

If there's interest in the issue, I could provide a minimal repro. But basically mapping an RW folder with a large (4GB+) file in it, then reading/writing this file in 16KB chunks should show approximately mentioned performance.