Closed fredlahde closed 5 years ago
Yep, that's certainly a thing with Docker on Mac currently - it uses a layer of virtualization since Mac's kernal (unix) doesn't play well with Docker (which needs Linux). Unfortunately I don't have control over that (altho I don't really have requests that slow on my projects- perhaps they're smaller. Perhaps is a MacBook - laptop - vs iMac - desktop - thing with access speeds).
Valet will always be faster on Mac since it's running PHP/Nginx (or Caddy, I forget which) directly on your Mac.
One way that helps is adding :cached
after all volumes on the docker-compose.yml
, you can see more info about it here:
https://stories.amazee.io/docker-on-mac-performance-docker-machine-vs-docker-for-mac-4c64c0afdf99 https://docs.docker.com/docker-for-mac/osxfs-caching/
I saw some good improvements here and no issues so far. I thought about opening a PR and defaulting i to cached
(linux and windows basically ignores that flag).
Also, the new version released yesterday has some good performance improvements for High Sierra:
https://docs.docker.com/docker-for-mac/release-notes/#stable-release-notes
For systems running APFS on SSD on High Sierra, use raw format VM disks by default. This improves disk throughput (from 320MiB/sec to 600MiB/sec in dd on a 2015 MacBook Pro) and disk space handling. Existing disks are kept in qcow format, if you want to switch to raw format you need to “Remove all data” or “Reset to factory defaults”. See https://docs.docker.com/docker-for-mac/faqs/#disk-usage
You go on Docker > Preferences > Remove all data
and it will start docker from scratch using the new Docker.raw
format.
Neat, thanks! On Wed, Jan 10, 2018 at 12:08 Daniel Polito notifications@github.com wrote:
One way that helps is adding :cached after all volumes on the docker-compose.yml, you can see more info about it here:
https://stories.amazee.io/docker-on-mac-performance-docker-machine-vs-docker-for-mac-4c64c0afdf99 https://docs.docker.com/docker-for-mac/osxfs-caching/
I saw some good improvements here and no issues so far. I thought about opening a PR and defaulting i to cached (linux and windows basically ignores that flag).
Also, the new version released yesterday has some good performance improvements for High Sierra:
https://docs.docker.com/docker-for-mac/release-notes/#stable-release-notes
For systems running APFS on SSD on High Sierra, use raw format VM disks by default. This improves disk throughput (from 320MiB/sec to 600MiB/sec in dd on a 2015 MacBook Pro) and disk space handling. Existing disks are kept in qcow format, if you want to switch to raw format you need to “Remove all data” or “Reset to factory defaults”. See https://docs.docker.com/docker-for-mac/faqs/#disk-usage
You go on Docker > Preferences > Remove all data and it will start docker from scratch using the new Docker.raw format.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/shipping-docker/vessel/issues/48#issuecomment-356687103, or mute the thread https://github.com/notifications/unsubscribe-auth/AAch09LstUZtUevcm97cVJJnBetfjehIks5tJPybgaJpZM4RKNnE .
That are some neat findings @dbpolito!
Thanks!
In case anyone else was wondering where to find Remove all data.
Docker > Preferences > Reset (💣in right corner)> Remove all data
We overcame this issue by synchronizing the local and the docker for mac filesystem using syncthing. We built an open source tool that follows this approach, in case it helps: https://github.com/okteto/cnd
Description
When using Vessel the application is very slow.
Maybe it has something to do with this issue: https://github.com/docker/for-mac/issues/77
OS
My OS is:
Docker
The output of
docker version
:The output of
docker-compose version
: