Docker for Mac is orders of magnitude slower than docker-machine, unusable

It’s unusable as it is. I’ve switched back to docker-machine, which is no speed demon, but at least it’s usable. I don’t know what’s going on with Docker for mac, but being 10-100x slower running the exact same images makes it unusable even for development.

Version 1.11.1-beta11 (build: 6974)
37559e5f6acd56a4810963acc7001e88f2d88017

Hi there!

I’d suggest you give more details! I run the exact same build as you without any issues so far.

What’s you Mac hardware/software configuration? What are the images you are running? (If they are public, I could spin them on my machine and let you know)

I’m on OS X 10.11.4 (15E65) on a MacBook Pro (Retina, 15-inch, Late 2013) (i7/16gb). Some of the images I’m running are below, though not all are public, and I really can’t explain why it takes so long for them to respond. docker-machine is itself a bit slower than running directly on a vm as well, but with Docker for Mac, I’m now looking at 10-30 second load times for something that loads under a second when running in a vm outside of docker (compared to ~0-3 seconds for docker-machine, which is itself significantly slower than a plain vm but generally usable).

  mysql:
    container_name: mysql-api
    command: mysqld --max_allowed_packet=1G --wait_timeout=31536000 --interactive_timeout=31536000
    image: library/mysql:5.6
    ports:
      - 3306:3306
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: ucfdb_dev
    networks:
      - backend
    volumes:
      - /mnt/sda1/data/mysql-api:/var/lib/mysql
  beanstalkd:
    container_name: beanstalkd-api
    image: schickling/beanstalkd
    ports:
      - 11300:11300
    networks:
      - backend
  redis:
    container_name: redis-api
    command: redis-server --appendonly yes
    image: library/redis:2.8
    ports:
      - 6379:6379
    networks:
      - backend
    volumes:
      - /mnt/sda1/data/redis-api:/data
  elasticsearch:
    container_name: elasticsearch-api
    image: library/elasticsearch:1.5.2
    ports:
      - 9200:9200
      - 9300:9300
    networks:
      - backend
    volumes:
      - /mnt/sda1/data/elasticsearch-api:/usr/share/elasticsearch/data

Starting that stack takes about 8 seconds on my machine (my spec below). How many CPU have you allocated to Docker for Mac?

It is noteworthy that your data in /mnt/sda1/data is obviously non-accessible to me so I am starting these services without any data.

MacBook Pro (Retina, 13-inch, Early 2015)
Processor 2.7Ghz Intel Core i5
Memory 16GB 1867 MHz DDR3

Docker for Mac
Docker[53260] : Application version: 1.11.1-beta11 (6974)
Docker[53260] : OSX Version: Version 10.11.4 (Build 15E65)

Config: 3 CPUs, 2 GB RAM

I’m getting similar performance issues as described here, I’m running on a 15" Retina (Mid 2014) with an upgraded i7 CPU (@3Ghz) and 16Gb of DDR3 RAM. I’ve configured Docker for Mac to use 3 CPUs and 4Gb of RAM.

Building an image in docker-machine takes about 30-45 seconds, building the same image in Docker for Mac takes about 15-20 minutes.

Docker for Mac

Docker for Mac: version: mac-v1.12.0-beta18-3-gec40b14
OS X: version 10.11.5 (build: 15F34)
logs: /tmp/20160707-075045.tar.gz
[OK]     docker-cli
[OK]     app
[OK]     menubar
[OK]     virtualization
[OK]     system
[OK]     osxfs
[OK]     db
[OK]     slirp
[OK]     moby-console
[OK]     logs
[OK]     vmnetd
[OK]     env
[OK]     moby
[OK]     driver.amd64-linux