You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consistent: Full consistency. The container runtime and the host maintain an identical view of the mount at all times. This is the default.
cached: The host's view of the mount is authoritative. There may be delays before updates made on the host are visible within a container.
delegated: The container runtime's view of the mount is authoritative. There may be delays before updates made in a container are visible on the host.
In 17.04 cached is significantly faster than consistent for many workloads. However, delegated currently behaves identically to cached. The Docker for Mac team plans to release an improved implementation of delegated in the future, to speed up write-heavy workloads. We also plan to further improve the performance of cached and consistent.
We will post updates relating to Docker for Mac file sharing performance in comments to this issue. Users interested in news about performance improvements should subscribe here.
To keep the signal-to-noise ratio high we will actively moderate this issue, removing off-topic advertisements, etc. Questions about the implementation, the behaviour, and the design are very welcome, as are realistic benchmarks and real-world use cases.
Reacted by Camden Narzt, Tijs Verkoyen, Eric Parton, Alexandre Jardin, Hideki Igarashi, Adam Biggs, Daniel Schwiperich, Dayne Jones, krmathis, Jens Fosgerau and 179 more
@yallop Is there a rough/expected release date for 17.04 (stable)
The next stable version will be 17.06, and is likely to be released some time in June. There's been a change to the Docker version numbering scheme recently so that the numbers now indicate the release date, with stable releases every three months (March, June, September, December), and edge releases in the months in between. For example, 17.04 is the Edge release in April 2017 and 17.06 is the stable release in June 2017.
Reacted by Adam Biggs, vijayanandnandam, Harrison Brown, Tanner J Ferguson, Satoru Kawahara, Quentin Fahrner, Alejandro Ramírez, Stefan M. Kudwien, Clinton Blackburn, Rudy and 3 more
Your example works. My own one still not (even after really making sure there were no left-over old mounted volumes). So I rebooted. Afterwards, it worked.
So: a reboot might be needed if you've run a docker-compose before upgrading docker to the latest version. Possibly related: I switched from docker stable to edge.
Is there a possibility of a global setting? I don't really want to add this option to the docker-compose.yml that all my linux colleagues are using.
Reacted by Chris Lasher, Michael Hood, Willian Josefi, Grant Welch and Davi Medeiros
not as far as I know. When you linux colleagues are running edge the flag should work.
Another workaround would be (that's what we do right now for separating linux and mac volume mounting )
to just put the mount settings for mac in a separate file, like docker-compose-mac.yml and then run docker-compose -f docker-compose.yml -f docker-compose.mac.yml up -d
Yes, I could do that. But.... I'd have to do that for each of the 12 docker-compose projects. And I'd have to keep it in sync with changes to the "master" docker-compose.yml.
As an intermediary measure: fine. Long term: no, as it is not very don't-repeat-yourself :-)
If someone wants to enable the "cached" behaviour, that person probably wants to use it for all/most of the dockers. Would it make sense as a config setting in the Docker app itself? In the preferences' "File sharing" tab? (This should probably be its own ticket, I assume?)
Provided that everybody uses the latest edge version, right? And it seems a bit strange to add an option that only has effect on osx to everybody's docker-compose.yml.
Anyway, it works for now. I won't drag the signal/noise ratio further down :-)
Thanks, @owsygavin. There are known performance problems with the new virtualization framework on Intel on Monterey (independent of virtiofs). We've reported it to Apple, and I believe they're working on it.
(@christophermclellan It could be worth adding that to your earlier message too, we've had a few people report it).
I am running an integration test suite against dependencies (MySQL and Redis) which live in Docker. With MySQL and Redis running on the host, this suite takes approximately 2-3s, the same amount of time it takes on Linux with Docker dependencies.
With Docker for Mac, it takes roughly 12-13s.
With the experimental build above, and both features enabled, on 12.2 w/ M1 Pro, it takes 75.5s.
I then tried to disable the experimental features by unchecking the top checkbox ("Use the new Virtualization framework"), which grayed out the bottom one ("Enable VirtioFS accelerated directory sharing") but left it checked. I hit save and Docker for Mac has hung ever since. Restarting results in it hanging with the message "Docker Desktop starting..."
None of the troubleshooting options - "Clean / Purge data", "Reset to factory defaults", and "Uninstall" - appear to be responsive. I downloaded and installed the stable version of Docker for Mac, and the issue persists. Since it's still starting I am unable to modify any settings to try unchecking both checkboxes.
I hit save and Docker for Mac has hung ever since. Restarting results in it hanging with the message "Docker Desktop starting..."
None of the troubleshooting options - "Clean / Purge data", "Reset to factory defaults", and "Uninstall" - appear to be responsive. I downloaded and installed the stable version of Docker for Mac, and the issue persists. Since it's still starting I am unable to modify any settings to try unchecking both checkboxes.
@johnmaguire sorry for the inconvenience. If anyone gets stuck, they remove the settings file ~/Library/Group Containers/group.com.docker/settings.json
Thank you to everyone that has provided feedback on the latest experimental build. Apple have just released the macOS 12.3 beta, in which the known speed problems with the new virtualization framework on Intel + Monterey should now be resolved (for example - the issue that @owsygavin reported here). If those that have previously experienced performance issues on Intel would be willing to try out 12.3 we'd be very appreciative of any feedback.
Hi, thank you for this amazing work! Performance of bind mount with virtiofs is far better than gRPC-fuse.
Now I found that chmod to bind-mounted directory fails randomly on macOS 12.3 beta1, like:
$ mkdir test
$ chmod 777 test
$ chmod 777 test
chmod: changing permissions of 'test': Operation not permitted
$ chmod 777 test
$ chmod 777 test
chmod: changing permissions of 'test': Operation not permitted
$ chmod 777 test
$ chmod 777 test
chmod: changing permissions of 'test': Operation not permitted
$ chmod 777 test
chmod: changing permissions of 'test': Operation not permitted
@sarisia, that's interesting. I can't reproduce here. Could you share your full command line for starting the container, in case the difference is more subtle? Are there other containers running on this host?
Ah yes, sorry, there is a new one at docker/roadmap#7 (comment). We should have posted it here too, that's our mistake. However, as the main conversation is at docker/roadmap#7, I'm actually going to lock this ticket now to keep everything in one place.
Activity
joemewes commentedon May 6, 2017
A rudimentary real-worked example (Drupal 8):
Docker for Mac : Version 17.05.0-ce-rc1-mac8 (16582)
Mac-mini :: MacOS Sierra : 10.12.2 (16C67)
A simple command line curl test (taken average of 10 calls to URL) Drupal 8 clean install frontend:
old UNISON (custom synced container approach) Volume mount :
0.470sstandard Volume mount:
1.401snew :cached Volume mount:
0.490v.easy implementation to add to my compose.yaml files and happy with any delay between host/output using cached on host codebase.
@yallop Is there a rough/expected release date for 17.04 (stable) ?
yallop commentedon May 8, 2017
The next stable version will be 17.06, and is likely to be released some time in June. There's been a change to the Docker version numbering scheme recently so that the numbers now indicate the release date, with stable releases every three months (March, June, September, December), and edge releases in the months in between. For example, 17.04 is the Edge release in April 2017 and 17.06 is the stable release in June 2017.
joemewes commentedon May 8, 2017
ok, thanks for that. do you expect 17.06 to contain at least the current edge implementation of :cached?
yallop commentedon May 8, 2017
Yes, that's the plan.
reinout commentedon May 9, 2017
How should this work in a
docker-compose.ymlfile? I tried appending:cachedto the existing volume setting:... but that got me an error (on OSX):
(Docker version 17.05.0-ce-rc1, build 2878a85)
Note: having a global setting or environment variable to switch my local default to "cached" would also be fine (or rather preferable).
DanielSchwiperich commentedon May 9, 2017
The syntax looks correct @reinout
here's a stripped but working example docker-compose.yml
tested on
Docker version 17.05.0-ce-rc1, build 2878a85reinout commentedon May 9, 2017
Your example works. My own one still not (even after really making sure there were no left-over old mounted volumes). So I rebooted. Afterwards, it worked.
So: a reboot might be needed if you've run a docker-compose before upgrading docker to the latest version. Possibly related: I switched from docker stable to edge.
Is there a possibility of a global setting? I don't really want to add this option to the
docker-compose.ymlthat all my linux colleagues are using.DanielSchwiperich commentedon May 9, 2017
not as far as I know. When you linux colleagues are running edge the flag should work.
Another workaround would be (that's what we do right now for separating linux and mac volume mounting )
to just put the mount settings for mac in a separate file, like docker-compose-mac.yml and then run
docker-compose -f docker-compose.yml -f docker-compose.mac.yml up -dSee https://docs.docker.com/compose/extends/
carn1x commentedon May 9, 2017
@reinout You could use an additional compose file to override that of your colleagues? For instance, we have:
docker-compose.yml:
and volumes-cached.yml:
Which can be run with:
reinout commentedon May 9, 2017
Yes, I could do that. But.... I'd have to do that for each of the 12 docker-compose projects. And I'd have to keep it in sync with changes to the "master"
docker-compose.yml.As an intermediary measure: fine. Long term: no, as it is not very don't-repeat-yourself :-)
If someone wants to enable the "cached" behaviour, that person probably wants to use it for all/most of the dockers. Would it make sense as a config setting in the Docker app itself? In the preferences' "File sharing" tab? (This should probably be its own ticket, I assume?)
yallop commentedon May 9, 2017
@reinout:
:cachedis supported across platforms, so there should be no issue in adding it directly to compose files.reinout commentedon May 9, 2017
Provided that everybody uses the latest edge version, right? And it seems a bit strange to add an option that only has effect on osx to everybody's docker-compose.yml.
Anyway, it works for now. I won't drag the signal/noise ratio further down :-)
428 remaining items
christophermclellan commentedon Jan 27, 2022
Thanks @back-2-95 ! I've now edited my comment from Tuesday to reflect that.
owsygavin commentedon Jan 27, 2022
I've installed MacOS 12.2 and the prototype Docker with these settings
It's absolutely crawling, it's so slow it's pretty much unusable with our large PHP application with lots of vendors.
Here are the numbers, I don't know how to interpret these runes but it may be of utility to a cleverererr person than me!
I can see that it's using virtiofs:
stephen-turner commentedon Jan 27, 2022
Thanks, @owsygavin. There are known performance problems with the new virtualization framework on Intel on Monterey (independent of virtiofs). We've reported it to Apple, and I believe they're working on it.
(@christophermclellan It could be worth adding that to your earlier message too, we've had a few people report it).
johnmaguire commentedon Jan 28, 2022
I am running an integration test suite against dependencies (MySQL and Redis) which live in Docker. With MySQL and Redis running on the host, this suite takes approximately 2-3s, the same amount of time it takes on Linux with Docker dependencies.
With Docker for Mac, it takes roughly 12-13s.
With the experimental build above, and both features enabled, on 12.2 w/ M1 Pro, it takes 75.5s.
johnmaguire commentedon Jan 28, 2022
In keeping with the trend in this thread, I ran the following benchmark.
w/ experimental features:
I then tried to disable the experimental features by unchecking the top checkbox ("Use the new Virtualization framework"), which grayed out the bottom one ("Enable VirtioFS accelerated directory sharing") but left it checked. I hit save and Docker for Mac has hung ever since. Restarting results in it hanging with the message "Docker Desktop starting..."
None of the troubleshooting options - "Clean / Purge data", "Reset to factory defaults", and "Uninstall" - appear to be responsive. I downloaded and installed the stable version of Docker for Mac, and the issue persists. Since it's still starting I am unable to modify any settings to try unchecking both checkboxes.
edit w/o experimental features:
PhilETaylor commentedon Jan 28, 2022
Which describes the issue I also had. docker/roadmap#7 (comment)
johnmaguire commentedon Jan 28, 2022
FWIW I was able to resolve the issue by deleting various Docker directories out of the ~/Library folder and /usr/lib/docker.
fredericdalleau commentedon Jan 29, 2022
@johnmaguire sorry for the inconvenience. If anyone gets stuck, they remove the settings file
~/Library/Group Containers/group.com.docker/settings.jsonchristophermclellan commentedon Feb 3, 2022
Thank you to everyone that has provided feedback on the latest experimental build. Apple have just released the macOS 12.3 beta, in which the known speed problems with the new virtualization framework on Intel + Monterey should now be resolved (for example - the issue that @owsygavin reported here). If those that have previously experienced performance issues on Intel would be willing to try out 12.3 we'd be very appreciative of any feedback.
sarisia commentedon Feb 8, 2022
Hi, thank you for this amazing work! Performance of bind mount with virtiofs is far better than gRPC-fuse.
Now I found that
chmodto bind-mounted directory fails randomly on macOS 12.3 beta1, like:Environment:
I can provide any further informations if needed!
fredericdalleau commentedon Feb 8, 2022
@sarisia, that's interesting. I can't reproduce here. Could you share your full command line for starting the container, in case the difference is more subtle? Are there other containers running on this host?
sarisia commentedon Feb 8, 2022
@fredericdalleau
I usually use VSCode devcontainer, but I've confirmed it can be reproduced
with the commands below:
Also, I tested both root and non-root user inside the container and
it only happens when using non-root user.
Peredery commentedon Mar 2, 2022
any news about new build? 😄
stephen-turner commentedon Mar 2, 2022
Ah yes, sorry, there is a new one at docker/roadmap#7 (comment). We should have posted it here too, that's our mistake. However, as the main conversation is at docker/roadmap#7, I'm actually going to lock this ticket now to keep everything in one place.