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

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

Comments

@FelikZ
Copy link

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
Copy link
Member

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
Copy link
Member

cpuguy83 commented Nov 9, 2014

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

@FelikZ FelikZ closed this as completed Nov 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants