Docker Desktop and Colima Benchmarking on macOS

There’s been lots of excitement about the new docker-based performance options on macOS with DDEV lately. In DDEV v1.19 Colima is a new option, and Colima with Mutagen enabled is screaming fast. But Docker Desktop has just released an experimental VirtioFS filesystem mounting system that is much faster than previous iterations. So I was interested in seeing how all these things compare.

Methodology: I tested each of these permutations with both a Puppeteer script to do a web install of Drupal 9 demo_umami and also a drush command-line install (ddev mysql -e "DROP DATABASE IF EXISTS db; CREATE DATABASE db;" && ddev exec killall -USR2 php-fpm && time ddev drush si -y demo_umami --account-pass=admin). I tried each 3 times to make sure that the numbers were tracking reasonably, and then took the mean. The Drupal 9 installation is a very heavy web activity that touches thousands of PHP files, and it’s a sequential operation with a fixed timeline, so it’s a tempting thing to use for benchmarking.

It turned out that the command-line installs basically tracked about twice as fast as the web-based installs, which was no surprise, but it probably means we don’t have to look at both of them to get a good idea of what’s going on, so I’ll show the comparison only for the command-line install, but the other graphs are in the linked spreadsheet.

(SVG higher resolution available) The bottom line is that Colima with Mutagen can do a D9 install in 20 seconds, which is astonishing. Colima with NFS is also really fast (just 50 seconds). Docker Desktop “bare” without NFS or mutagen is hopelessly slow, but better with NFS and pretty good with mutagen. The “New Virtualization” option gets the timing down to nearly where mutagen is with Docker Desktop, and VirtioFS is better, but still nowhere near as fast as Colima with mutagen. Docker Desktop with VirtioFS + Mutagen is screaming fast (about the same as Colima with Mutagen) but it has a big asterisk – there were loads of errors output, and VirtioFS has problems with DDEV (and lots of other things).

If you’re interested in the raw numbers and other graphs, here’s the spreadsheet link.

If you’re interested in Colima with DDEV, see the docs. It’s super easy to set up, and even though it’s a young project, it’s well-maintained and people have been having good experiences with it. And for those of you concerned about Docker Desktop’s new subscription license fee, it’s a great option. But as you see here, it’s a great option for other reasons.

And of course, if you haven’t tried out mutagen with DDEV on macOS, it’s time. People have had great experiences, just ddev config global --mutagen-enabled and ddev restart and you’re on your way, see DDEV docs. A nice feature of DDEV v1.19 is that it doesn’t use nearly as much disk space as this feature did previously.

If you’re interested in the Docker Desktop VirtioFS feature and how it’s maturing, the very extensive discussions are going on in these issues. Some people are reporting great performance gains, others are having a number of permission-related problems similar to some of the problems it has with DDEV. I do not recommend enabling the experimental features in Docker Desktop for use with DDEV at this time (Docker Desktop v4.6.1).

Interested in engaging more with the DDEV community? Catch us in the Discord Server, on Stack Overflow, and in the Issue Queue on GitHub. We’d love to have you. Interested in knowing more about DDEV? It’s quick and easy to start up in the docs.

Share this post: