-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker Desktop 2.3.02 host volume mount performance #6742
Comments
Got the same problem using a php container to run Symfony framework. |
Thanks for the report, is this with the WSL 2 or the Hyper-V backend? |
Hi, |
I don't have diagnostics handy but will try and pull that together on Monday. My original numbers were Hyper-V I've since switched to WSL2 and the numbers when using Windows volume mount are still what I described originally. Not surprisingly if I use a mount to file system in WSL then the numbers are quite good. Essentially the same as if I had everything directly in the container itself. |
Disabling WSL2 and going back to the Hyper-V backend made me recover decent performances. |
Bind mounting files from Windows into wsl2 is very costly indeed. The best practice about bind mounts with the WSL 2 backend is to fully embrace WSL 2 and host your source files in your WSL distro instead of on the Windows file system. In this scenario, bind mounts performance is much better than with the Hyper-V backend. |
Same problem here with Hyper-V backend. Since update from 2.2.0.0 build time raised from 12 minutes to 35 minutes. |
Hi all, Can you please describe the reason why you could not put your source files inside you wsl 2 distro filesystem ? Doing this bring you:
I know that some IDEs have limitations with working with the \wsl$ file share, and would really like to author IDE-specific workarounds and guidance for having the best development experience as well as running performances. |
I'm doing PHP, I do not need to build my code every time to test it. The problem is about the fact that we always worked like this under Windows, then suddenly we have to do it an other way without any clear information or complete documentation. At this point, I load my code from a volume specified in my docker-compose.yaml. How should I declare it now to use the advantages of WSL2 ? |
is it a named volume, or a mount from the Windows host ? If it is a named volume, you can continue like this.
If you use Visual Studio Code, you can run it in "Remote WSL mode" (just run Otherwise, other editors can access your WSL 2 files via the network share |
Second case, mount from Windows. |
@simonferquel Couldn't agree more that keeping source in WSL 2 and using docker/docker-compose from within that space is a great performance improvement. Even over native Windows. I did go down that WSL 2 path as indicated by the numbers I posted. However Windows build 2004 is not even generally available yet. I had to go WIndows Insider Preview to use WSL 2 and provide those numbers. I work in a large enterprise and had to get special permission to even try the Insider Preview and get WSL 2. Even though Windows build 2004 will be generally available on May 28th that doesn't mean developers in large corporations will have access to it. Before they drop it in place for general usage it will go through a wide array of security and compatibility testing internally which could put it another 6 months off. But it is pretty hard to stomach that without encouraging thousands of developers to ask for Insider Preview permissions and changing up the way everyone works that DD 2.3.02 is ~6 times slower than native Windows and ~3 times slower than DD 2.1.0.5. |
@jtoe using the Hyper-V backend, you should see performance improvements compared to DD 2.1.0.5. It is only the WSL 2 backend that suffers this performance issue when mounting windows files. This is because our hyper-v backend comes with GRPC Fuse, which we cannot enable on WSL 2 backend, due to dependencies on some Linux Kernel patches. In term of performance, you should see things in this order:
|
@simonferquel - The 2.3.0.2 Hyper-v backend is where we don't appear to be on the same page.
This has been prevalent with many people in my organization as we try and move to 2.2+ |
I can confirm that I experience a similar issue on my end: ugprading to I have opened a forum post explaining the details of what happened. If you can't read, I'll copy/paste the content here:
I don't use WSL, I'm still on the Hyper-V backend (and I don't want to migrate for now, I'm too scared of the consequences). |
I'm having a similar problem. I'm trying to run Nextcloud in Docker containers using a Windows host and WSL2 backend. I need to put the data on a separate drive, and there is no way to mount a second VHDX drive or a raw ext4 drive to WSL2. My only option is to mount a Windows volume as the data drive. I hope there is something that can be done in a future version of DD to improve the performance across the Windows mount. |
suffering the same issue after Upgrading to WSL2...... export process is taking more than 40min instead of 5min with the Legacy (Hyper-V).... this is really too annoying |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
Unfortunately we (Docker) can't fix the mount speed from files on the Windows side to the WSL 2 backend, because it's not our code, it's wholly managed by Windows. We do document the issues, see https://docs.docker.com/docker-for-windows/wsl/. There are tickets for it at microsoft/WSL#873 and microsoft/WSL#4197. |
Sorry, I closed this without reading the whole ticket: it looks like there is more than one issue here. I've reopened this ticket for the Hyper-V backend. |
Thanks @stephen-turner. My originally reported issue was entirely about Hyper-V. |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
Windows 10 host mounted volumes performance which is comparable with previous versions of Docker Desktop.
Actual behavior
performance of file i/o against Windows 10 host mounted volumes appears to have taken an extreme turn for the worse.
In my case I'm performing a "build" which involves 70k+ files and some tarring and untarring. The results of this build in various environments are as follows:
12 minutes - Straight Windows 10 (git bash)
19 minutes - Docker Desktop 2.1.0.5 against host mounted volume (Windows /c drive)
71 minutes - Docker Desktop 2.3.0.2 against host mounted volume (Windows /c drive)
2 minutes - Docker Desktop 2.1.0.5 against container file system
2 minutes - Docker Desktop 2.3.0.2 against container file system
Information
Please, help us understand the problem. For instance:
Yes
Yes
Yes
I've not attemped to simplify this yet. But a large zip/tar file being unzipped and then rezipped would likely show the issue
-->
10
2.3.0.2
No
The text was updated successfully, but these errors were encountered: