-
Notifications
You must be signed in to change notification settings - Fork 290
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
Shared Volumes Slow #188
Comments
Thanks for reporting. The volume mounts are implemented using a SMB share mounted over the guest/host network. Out of curiosity, what's your development use-case that requires greater than 20 MB/s transfer-rate when using volumes? |
I use docker for local web development. I have nginx, php-fpm, mysql containers. Speed website pages load very slow 5-10 sec. It is possible to encrease volumes speed? |
I have same problem. Inside container :
Insidde container share folder :
Docker info :
Docker volume inspect :
Docker compose :
Is it possible to use NFS of other file sharing system ? |
Same usecase and behavior for me. |
@friism One of the solutions would be to allow modification of rsize&wsize parameters of smb mount. PHP projects usually consist of hundreds of small files (which have to be loaded on every request) and large rsize degrades performance for this use case. @dimasnake Try beta 21 if you have installer, performance is much better. |
@fmasa I don't have the installer. Where I can download 21 beta? |
Here is a beta version of Docker for Windows but really beta 21? The latest beta has the version tag |
@saschanaz Yes. Take a look at the end of the tag ( |
I found it! Gonna restart my machine and try it. |
Can't get it working. Returned to latest beta (30.1). |
I read in another issue, that installer auto-updates to latest version. :/ So once you updated, you're stuck with that version. |
This issue has is more appropriate name then #188 There is also alike issue in docker for mac: docker/for-mac#77 I also experience this for example with To reproduce it you may just take some image with GIT installed and attach some big repo and try do do |
@dimasnake Are you sure you have beta 21 installed? I found out that installer auto-updates to latest version no matter what. @friism Is there any roadmap for this issue? |
@fmasa I disable auto-update. I have 1.12.0-beta21 (build: 5971). You have in 21 beta performance better? Show output if this command |
@fmasa we're aware of the problem. Note that volume I/O performance will likely always be slower than pure in-container performance and pure on-host performance because the host-mounted volume filesystem is mounted over a network. We're interested in making that overhead as low as possible, of course, but we're not keen on adding a lot of toggles that users have to change depending on what software they happen to be running in containers right now. |
@friism Some performance hit in mounted volumes is expected, but it for this particular use case it's just too much for DfW to be usable on daily basis. |
/remove-lifecycle stale |
from that link;
This is not a feasible solution. By default, the WSL filesystem is located on the Windows OS install drive, and is limited to 256GB in size. It is common for systems with a lot of high throughput disk IO to have dedicated drives such as fast SSD's meant for this purpose; the solution here makes it impossible to use your dedicated fast storage hardware. If you followed this guide, you will likely lock up your entire OS pretty quickly and fill the boot disk. |
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 |
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 I switched from WSL to Hyper-V as backend because the bind was so slow, after a while working with Hyper-V, today it went for a very good speed to a very low speed, not sure what happened.. This is the comparison of the current speed Environment
Hyper-V BackendDocker Volume (Using SSD 500 MB/s R/W )
Docker Bind (Using SSD 4 GB/s R/W)
WSL BackendDocker Volume (Using SSD 4 GB/s R/W )
Docker Bind (Using SSD 4 GB/s R/W )
|
So.. in 6 years and counting isn't there a solution yet? It's just nuts.. I am working with hyper-v (wsl has too many limitations for my use case) and file access to host directories is painfully slow. The only option is using linux it seems |
Guys I have the same problem. And I resolved it. I use this guide https://docs.docker.com/desktop/windows/wsl/ My resultats if I run docker from windows cmd with volume If i run docker from debian with volume And in last case gulp-watch works! I am really happy. |
Volumes works fine from windows too These are my results: Hyper-V Bakend (Bind)
WSL Bakend (Bind)
WSL Bakend (Volume)
|
Sorry, not volume I meant bind of course |
Your stats show that io is a little faster for binds than Hyper-V.
But still not nearly as fast as a volume.
What I've been doing is running vs-code off Docker so I actually have all
my code in a docker volume.
…On Sun, Mar 13, 2022, 6:37 PM freeze000 ***@***.***> wrote:
Sorry, not volume I meant bind of course
—
Reply to this email directly, view it on GitHub
<#188 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABUTPCINGZ64SVWHVE3V6RDU7ZU3JANCNFSM4CUZ2CFQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
You may have a volume for multiple reasons, using a Development Container is a good choose for coding but not great for any other stuff, it just copies all inside a volume and creates a container. Dealing with big files is horrible, we cannot be copying +100 GB to a volume. I haven't tested in Windows 11 tho, they added some improvements |
Share the folder on windows side, mount the shares on the Wsl (ubuntu) distro Speed went from 40-60 MB/s using a CIFS volume to 1 GB/s. Still a lot slower than the mount point, 3GB/s, but enough for me. speed tested with Windows 11 and everything on latest version. |
I am still facing the same issues with Windows 11 and Ubuntu wsl. A web app that I am working on will take 15 seconds to load a page, when it usually would be less than 2 seconds. Is there still no solid solution? |
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 |
Yeah, this is still a major problem. |
At this point it's more likely a problem with WSL2. I ran the test mentioned by OP in WSL2; in my Windows home directory and in my Linux home directory. username@978TQJ3:/mnt/c/Users/username$ dd if=/dev/zero of=test.dat bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB, 98 MiB) copied, 9.48475 s, 10.8 MB/s
username@978TQJ3:/mnt/c/Users/username$ cd
username@978TQJ3:~$ dd if=/dev/zero of=test.dat bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB, 98 MiB) copied, 0.10946 s, 936 MB/s The difference is approximately 100x. |
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. /lifecycle locked |
Expected behavior
File access in volumes should be comparable to access times in non-volumes, similarly to Linux installations of docker
Actual behavior
File access in volumes is many times slower than on non-volumes.
Information
Version: 1.12.3-beta29.2 (8280)
Channel: Beta
Sha1: 902414df0cea7fdc85b87f0077b0106c3af9f64c
Started on: 2016/11/01 21:19:46.408
Resources: C:\Program Files\Docker\Docker\Resources
OS: Windows 10 Pro
Edition: Professional
Id: 1607
Build: 14393
BuildLabName: 14393.351.amd64fre.rs1_release_inmarket.161014-1755
Steps to reproduce the behavior
Get on the commandline of a lightweight docker container
and mount a volume:
In 9 times slower.
The text was updated successfully, but these errors were encountered: