Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker on macOS

Diagnose information

Docker for Mac: version: 1.12.1 (2d5b4d9)
OS X: version 10.12 (build: 16A323)
logs: /tmp/E2010294-2643-4695-81A0-4355D20551C6/20160929-174317.tar.gz
[OK]     docker-cli
[OK]     virtualization kern.hv_support
[OK]     menubar
[OK]     moby-syslog
[OK]     dns
[OK]     disk
[OK]     system
[OK]     app
[OK]     osxfs
[OK]     virtualization VT-X
[OK]     db
[OK]     slirp
[OK]     logs
[OK]     env
[OK]     vmnetd
[OK]     moby-console
[OK]     moby
[OK]     driver.amd64-linux

Non-mount volume

$ docker run -ti nginx /bin/bash
root@701e3c6e8150:/# time dd if=/dev/zero of=test.dat bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB) copied, 0.364138 s, 281 MB/s

real	0m0.368s
user	0m0.010s
sys	0m0.350s

Mount volume

$ docker run -ti -v /Users/aming/docker_test:/tmp:rw nginx /bin/bash
root@0df6f4833e15:/# cd /tmp/
root@0df6f4833e15:/tmp# time dd if=/dev/zero of=test.dat bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB) copied, 38.2342 s, 2.7 MB/s

real	0m38.242s
user	0m0.150s
sys	0m2.820s

Mount volume

root@7495d2716cd1:/var/www/html# time dd if=/dev/zero of=test.dat bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB) copied, 41.8995 s, 2.4 MB/s

real	0m41.907s
user	0m0.170s
sys	0m2.670s

The speed is terrible. 😱

Mount volume with docker-sync

root@0cda08e3b09f:/var/www/html# time dd if=/dev/zero of=test.dat bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB) copied, 0.214381 s, 478 MB/s

real	0m0.218s
user	0m0.020s
sys	0m0.180s

With docker-sync in unison sync strategy, the speed is wonderful. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.