for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

Massive performance difference between docker-for-mac and docker-machine

Open arthurlm44 opened this issue 10 years ago • 5 comments

Expected behavior

Performance equal to docker-machine

Actual behavior

Much slower than docker-machine

Information

Using docker-compose to start and run a mysql container. Running a Rails application natively on OSX host. When running Rails migrations, against the dockerized mysql container, I'm getting massive performance differences between docker-for-mac and docker-machine (using virtualbox)

Docker-for-Mac: real 10m29.800s user 0m11.336s sys 0m3.192s

docker-machine: real 0m32.145s user 0m9.637s sys 0m2.719s

That is a 20x performance difference.

Is this caused by xhyve limitations? Should we expect docker-for-mac performance issues to be addressed? The performance issues, unfortunately, are stopping us from using docker for local development on OSX.

arthurlm44 avatar Sep 21 '16 19:09 arthurlm44

@arthurlm44 I can confirm that I'm also seeing MAJOR performance issues when comparing Docker for Mac and Docker Machine.

Information

I actually tried three different configurations:

  1. Node 6 app locally on OS X Yosemite, Redis and Postgres on Docker Machine
  2. Node 6 app, Redis and Postgres all running on Docker Machine
  3. Node 6 app, Redis and Postgres all running on Docker for Mac

I ran a test suite that contains a little over 300 tests. Here are my results:

Config 1 (Local + Docker Machine): ~5 minutes Config 2 (Docker Machine): ~7 minutes Config 3 (Docker for Mac): ~18 Minutes

Versions: running Docker Toolbox 1.12 and Docker for Mac 1.12

jamesdixon avatar Sep 22 '16 01:09 jamesdixon

I believe this is a duplicate of a known issue (and currently being worked on) as stated in #668 and #677?

bobbypriam avatar Sep 22 '16 14:09 bobbypriam

So is this issue related to File I/O performance problems as well?

flyandi avatar Sep 23 '16 19:09 flyandi

This issue is likely a duplicate of #668 which tracks a recent performance regression in Docker for Mac's block storage layer related to disk flushing.

If this is using -v bind mounts from the host OS X system or compose volumes with OS X paths, this issue is a duplicate of #77.

If you believe that neither of these issues is the same as your issue, please feel free to re-open this issue with additional details to help us understand the problem you are experiencing. Thanks for using Docker for Mac!

dsheets avatar Sep 24 '16 17:09 dsheets

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-robott avatar Jun 20 '20 03:06 docker-robott