I’ve heard many devs working on MacOS that their Docker development environment is slow. Enabling these experimental features can be a quick and easy improvement.
Experimental features
In Docker Desktop, go to Settings and then to Experimental features.
Enable “Use the new Virtualization framework” and “Enable VirtioFS accelerator directory sharing”.
Press “Apply & Restart”.
Performance
Apache Benchmark can be used to test the performance increase of these features. Using my recently created ab-runner tool simplifies the process.
For each setup, the script made 500 requests to the about page of this blog (running locally on Docker, of course). Response times are averaged over all runs. Docker is running version 4.12.0, MacOS is on version 12.6.
The first run (left) was done with default settings. For the second run (middle) only the new Virtualization framework feature was enabled. The third run (right) also enabled the VirtioFS feature.
The results are very clear: response times went down from 785 ms to 232 ms. That is more than 3 times as fast as before!
Naturally, your milage may very, depending on your project and on your machine.
Just give it a go. It takes less 5 minutes to change and might make your developer experience a lot better.