Blog

Welcome to my blog, a dynamic space where I delve into the world of technology. Here, I not only share an array of tools, tips, and techniques that I’ve gathered over the years but also explore diverse tech topics. Additionally, this blog serves as a personal canvas, reflecting the various events and experiences from my life. It's a blend of professional insights and personal stories, all aimed at enriching your understanding of the ever-evolving tech landscape.

DDEV and Mutagen on Apple M1

Nov 07, 2021

I'm a Linux desktop user and have been for three years. A driving reason for my switch from Mac to Linux was performance. As a LAMP stack web developer, using Docker-based tools for local development is a must. A nagging problem for developers is the performance of Docker on macOS, specifically file system performance. I share some performance comparisons in the January 2020 blog post, Faster Drupal Development on Linux.

On a recent episode of Talking Drupal, #318 DDEV, Randy Fay, the maintainer of DDEV talked about the DDEV's recent addition of Mutagen. He claimed DDEV with Mutagen on Mac runs "almost as fast as native Linux." I had to check it out.

 

Testing Environment

I configured a newly acquired Mac with an existing Drupal project running locally with DDEV. I also installed this project on my Linux desktop.

  • Mac mini (M1, 2020) - 8GB RAM - 250GB SSD - macOS BigSur 11.5.2
  • Linux desktop - AMD Ryzen 9 3900x - 16GB RAM - 1TB M2 - Pop!_OS 21.04

Testing Process

I followed the steps below with Mutagen turned on and off and ran the test multiple times to verify the results were consistent. I followed the same steps on Linux without Mutagen.

ddev stop --remove-data
ddev poweroff
(set mutagen on or off)
ddev auth ssh
ddev start
ddev mutagen status
rm -rf vendor
time ddev composer install --no-cache 

Results

DDEV without Mutagen on Mac:
composer install --no-cache - 4:41.91 total 
DDEV with Mutagen ddev on Mac:
composer install --no-cache - 16.602 total
DDEV without Mutagen on Linux:
composer install --no-cache - 13.658 total

Caveats and Conclusion

I only recently started using DDEV after listening to Randy on Talking Drupal, so my experience with it is not much more than conducting this experiment. However, I believe the testing process had enough controls to fairly evaluate a single action; composer install. If I've missed something here, I expect someone will let me know.

If you are a PHP developer using a Mac, the results of 4.5 minutes vs. 16.5 seconds demonstrate that DDEV with Mutagen should be evaluated as a local development environment. However, the Mutagen implementation is new and there are some caveats outlined in the Performance Documentation.

While I tested on Apple new M1, I would expect similar results from the Intel line of computers.

I'm glad to have been exposed to DDEV and its helpful community. I will continue exploring a switch to it, even in my Linux environment.