Skip to content
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

Mounting host files makes docker unusably slow. #5595

Closed
3 tasks done
BrendonW opened this issue Apr 16, 2021 · 3 comments
Closed
3 tasks done

Mounting host files makes docker unusably slow. #5595

BrendonW opened this issue Apr 16, 2021 · 3 comments

Comments

@BrendonW
Copy link

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: 42E986E0-66D2-45E5-8349-7C213B28992A/20210416214838

Expected behavior

Prior to upgrading to 3.3.0, running a command in a container that mounted a host file system took a very similar length of time as running the same container without mounting the files.

Actual behavior

The container has a rails server in it:-

time docker run -ti --rm <container> rake --tasks
real 0m6.962s
user 0m0.115s
sys 0m0.067s

Same container mounting the identical rails source tree from a host directory:-

time docker run -ti -rm --mount type=bind,source="$(pwd)/rails",target="/home/hosting/rails" <container> rake --tasks
real 2m17.010s
user 0m0.135s
sys 0m0.068s

This makes it impossible to deploy a stack that mounts an editable source tree.

Information

  • This is reproducible on demand. A coworker using an M1 mac has the exact same problem.
  • During the huge time difference between the two cases, the hyperkit CPU usage stays over 300-400% in the activity monitor.
  • This is a new problem
  • The problem appeared when we updated to 3.3.0
  • macOS Version: 11.2.3
  • Intel chip or Apple chip: 3.2 GHz 6-Core Intel Core i7
  • Docker Desktop Version: 3.3.1 (63152)

Steps to reproduce the behavior

  1. Run a rails command in a container that mounts the rails source tree.
  2. There is something about how Rails accesses the files during startup that seems to be making it behave so badly in these recent versions.
  3. If needed, I'll try and create a simple container to reproduce this.
@adrubesh
Copy link

There a long discussion about this here that might help you: #3677

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

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.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Sep 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants