Volumes in v1.3+: mounted volumes in OSX 10.10 is 27x times slower than usage of VM filesystem #9043

Closed
FelikZ opened this Issue Nov 8, 2014 · 2 comments

Projects

None yet

2 participants

@FelikZ
FelikZ commented Nov 8, 2014

So I run docker with two volumes, like this:

docker run -ti --name nodejs2 -p 3000:3000 -v /data -v ~/test/game-backend/:/data2 dockerfile/nodejs

The first volume /data is placed in VM and the second /data2 is mounted from OS X 10.10 .

Here is usage of dd tool and the impressive results.

Write speed 483 MB/s to VM's /data dir:

$ time sh -c "dd if=/dev/zero of=/data/1 bs=4k count=2000000 && sync"
2000000+0 records in
2000000+0 records out
8192000000 bytes (8.2 GB) copied, 16.9534 s, 483 MB/s

real    0m17.130s
user    0m0.460s
sys 0m15.860s

Write speed 20.7 MB/s to OS X mounted dir /data2:

$ time sh -c "dd if=/dev/zero of=/data2/1 bs=4k count=2000000 && sync"
2000000+0 records in
2000000+0 records out
8192000000 bytes (8.2 GB) copied, 396.236 s, 20.7 MB/s

real    6m36.254s
user    0m0.730s
sys 3m6.400s

Read speed 568 MB/s from VM's /data dir:

$ time sh -c "dd if=/data/1 of=/dev/null bs=4k"
2000000+0 records in
2000000+0 records out
8192000000 bytes (8.2 GB) copied, 14.4115 s, 568 MB/s

real    0m14.418s
user    0m0.020s
sys 0m11.900s

Write speed 20.4 MB/s from OS X mounted dir /data2 (I break it earlier to not to wait 6 mins):

$ time sh -c "dd if=/data2/1 of=/dev/null bs=4k"
^C245397+0 records in
245396+0 records out
1005142016 bytes (1.0 GB) copied, 49.3521 s, 20.4 MB/s


real    0m49.358s
user    0m0.170s
sys 0m27.710s

Both VM's virtual hard drive and mounted dir are located in physical SSD drive, but the speed difference is frustrating.

Is this a bug?

@cpuguy83
Contributor
cpuguy83 commented Nov 9, 2014

No, this is because this is being mounted over virtualbox shared folders and is absolutely expected to be slower.
boot2docker/boot2docker#593

@cpuguy83
Contributor
cpuguy83 commented Nov 9, 2014

Also, this should be closed since it is an "issue" with boot2docker.

@FelikZ FelikZ closed this Nov 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment