Skip to content

Bind mounts are really slow #3677

@Miksu82

Description

@Miksu82
  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: CE10E9E0-4D58-4D8C-8533-82134EF088B2/20190520070056

Disk IO from/to container to/from host is really slow. I am running some IO heavy unit/integration/end-to-end test workloads that take ages to complete. My co-workers using Linux don't have that problem

I know this has been discussed in several issues already (such as #2707, #1592) and buried inside them may have suggestions for configurations that should improve performance or comments that docker-sync should be used etc.

But it would be nice to have the following from the Docker team:

  1. Documentation what causes this issue.
  2. Documentation and how-to's to improve the performance (configurations?, VirtualBox instead of HyperKit?)
  3. Is there work on-going to improve situation. If there is, is there a pull-request/ticket/branch or something else where this work can be followed and collaborated.

Expected behavior

File reads/writes between container and host are ~same as inside container.

$ docker run --rm -it -w /pwd alpine time dd if=/dev/zero of=speedtest bs=1024 count=100000
100000+0 records in
100000+0 records out
real	0m 0.37s
user	0m 0.03s
sys	0m 0.31s

Actual behavior

$ docker run --rm -it -v "$(PWD):/pwd:delegated" -w /pwd alpine time dd if=/dev/zero of=speedtest bs=1024 count=100000
100000+0 records in
100000+0 records out
real	0m 31.82s
user	0m 0.34s
sys	0m 3.04s
$ docker run --rm -it -v "$(PWD):/pwd:cached" -w /pwd alpine time dd if=/dev/zero of=speedtest bs=1024 count=100000
100000+0 records in
100000+0 records out
real	0m 34.16s
user	0m 0.21s
sys	0m 3.78s

Information

  • macOS Version: 10.14.4
  • Docker for Mac: 2.0.0.3
  • Docker Engine: 18.09.2
  • Docker Machine: 0.16.1

Steps to reproduce the behavior

$ docker run --rm -it -v "$(PWD):/pwd" -w /pwd alpine time dd if=/dev/zero of=speedtest bs=1024 count=100000

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions