https://www.docker.com/blog/speed-boost-achievement-unlocked-on-docker-desktop-4-6-for-mac/ . [ ] * Products + Product Offerings o Docker Personal o Docker Pro o Docker Team o Docker Business o Compare Subscriptions + Features o Docker Desktop o Docker Hub o Container Runtime o Developer Tools o Trusted Content o Docker Product Roadmap * Developers + Docs + Getting started + Community + Open Source + Preview Program * Pricing * About Us + What is a Container? + Why Docker + Virtual Events + Swag Store * Partners [ ] Sign In Get Started Speed boost achievement unlocked on Docker Desktop 4.6 for Mac [chris_profil] Chris McLellan Mar 16 2022 Introducing virtiofs The 4.6 release of Docker Desktop for Mac contains a number of changes that drastically improve file sharing performance for macOS users. Firstly, developers now have the option of using a new experimental file sharing implementation called virtiofs (the current default is gRPC-FUSE). Secondly, improvements have been made to the way that files are synced between the macOS host and Docker VM. During testing with our amazing macOS community of users, we have observed that these changes have reduced the time taken to complete filesystem operations by up to 98%. For developers, these incredible gains in speed mean less time waiting for filesystem operations to complete (or building project-specific workarounds to improve performance) and more time focusing on innovation! Understanding common developer workflows A common developer workflow when using technologies like Symfony or React is to edit source code located on the macOS host while running the app itself in a Docker container. The source code is shared between the host and the container by using Docker volumes, with a command like the following: docker run -v /Users/me:/code -p 8080:8080 my-symfony-app This allows the developer to edit their source code, save the changes and immediately see the results in their browser. Changes made to files located on the host system must propagate quickly and reliably to the container file system for the developer to optimize productivity and have a good user experience. This is where file sharing performance is absolutely critical. Big performance improvements Performance is vital when application source code is shared between the host and container. For example when a developer uses the Symfony PHP framework, edits the source code and then reloads the page in the browser, the web-server in the container must re-read many PHP files stored on the host. When considering that modern dependency management can easily bring 10k - 100k files into a project (which linearly increases the performance penalty), this can result in poor performance as the host and container keep in sync via the volume. The recent changes to Docker Desktop for Mac, including the usage of virtiofs, alleviate this problem and bring drastic improvements to file system performance. Specifically, developers working with an early preview of Docker Desktop 4.6 with virtiofs enabled and changes to file syncing included have observed: * A 90% improvement in the time taken to complete a 284MB MySQL import (3m 16s to 18s) * An 87% improvement in the time taken to run 'composer install' in a large codebase (1m 27s to 11s) * An 80% improvement in the time taken to boot a monolithic Typescript app (1m 30s to 18s) And here are some of the comments we've heard from users: * "This works great on my mac mini M1!, running migrations on my laravel instance is now instant...instead of running for minutes." (Source: Github user feedback) * "My development setup is ridiculously fast now. Thanks everyone!" (Source: Github user feedback) * "Looking forward to seeing this enhancement land in a released build. It was like night and day! ." (Source: Github user feedback) How to enable virtiofs Virtiofs is only available to users of the following macOS versions: * macOS 12.2 and above (for Apple Silicon) * macOS 12.3 and above (for Intel) To enable virtiofs in Docker Desktop: * Ensure that you are using Docker Desktop version 4.6, available here * Navigate to 'Preferences' (the gear icon) > 'Experimental Features' * Select the 'Use the new Virtualization framework' and 'Enable VirtioFS accelerated directory sharing' toggles * Click 'Apply & Restart' [Screenshot-2022-03-09-at-10] Your feedback is needed! Virtiofs is accessible today within Docker Desktop for Mac (version 4.6) and available to all users including Docker Personal free users as well as Docker Pro, Team and Business paid subscription users. Please download it, give it a try and let us know how it goes. If you discover any problems, please report them on the Mac filesystem performance thread on our public roadmap. For the moment, we are aware of an outstanding issue where containers running with virtiofs can fail due to permission errors. We have released a fix for this in an experimental Desktop build to the Mac filesystem performance thread and will confirm its stability in the coming days. Likewise, we're always interested to hear of any performance benchmarks that you may use to test out virtiofs ! Download button for Desktop 4.6 Thanks to our macOS community We'd like to say a massive thank you to our macOS community of users for providing brilliant feedback and testing out the feature so rigorously. In particular, the excellent analysis of file system performance conducted by Konstantinos Tsanaktsidis led to valuable insights around file syncing. docker, docker desktop, macOS Post Tags * docker * docker desktop * macOS Categories * All * Products * Community * Engineering * Company Community All Hands #5 Community All Hands Join us in celebrating Docker's 9th Birthday at our next Community All Hands on March 31st! This virtual event is a unique opportunity for the community to come together to share and learn about all things Docker. Register Now Related Posts Vulnerability Alert: Avoiding "Dirty Pipe" CVE-2022-0847 on Docker Engine and Docker Desktop By Shashank Sharma March 16 2022 How Kubernetes works under the hood with Docker Desktop By Anca Iordache March 04 2022 What you need to know about macOS X 10.14 Deprecation By Steph Rifai March 02 2022 * Products + Product Offerings o Docker Personal o Docker Pro o Docker Team o Docker Business o Compare Subscriptions + Features o Docker Desktop o Docker Hub o Container Runtime o Developer Tools o Trusted Content o Docker Product Roadmap + Developers o Docs o Getting started o Community o Open Source o Preview Program o Pricing # FAQ # Docker Verified Publisher # Partners # About Us @ What is a Container @ Why Docker @ Virtual Events @ Swag Store @ Newsroom @ Careers @ Contact Us @ Customers @ Newsletter @ @ @ @ @ (c) 2022 Docker Inc. All rights reserved | Terms of Service | Privacy | Legal Loading Comments... Write a Comment... [ ] Email (Required) [ ] Name (Required) [ ] Website [ ] [Post Comment]