Dev environment performance tests: Docker vs. Native, Mac vs. Linux, old vs. new
I feel pretty dumb, because I did this to my 2014 MacBook Pro 15":
…which is how I ended up with three computers, on which I ran the tests, below.
Right now, at the start of 2018, it’s been ridiculously hard for me to replace both the mobile and desktop functions of my crushedMBP. (I don’t like the user experience of the new MBP’s. And yeah, maybe I overthink decisions like this.)
On the bright side, around this time, I switched from Vagrant to Docker Compose for my Rails development environments (for each client project, and each personal project), and I discovered that I don’t actually need 16 Gig RAM for Rails and Haskell dev any more! Seriously, Docker is a freakin’ miracle.
What follows is a performance test of development tasks on my three new machines.
A maxed out Mac Mini w/ 512GB SSD, full specs. Was $1,170 used from PacificMacs on Amazon:
A Dell XPS with the fastest non-overclocked 7th gen i7 CPU and a Samsung EVO SSD. Around $1,100 open box from Best Buy. It’s running Fedora Linux:
A maxed out MacBook Air 13", $1,350 new at Best Buy.
Here are the results of the average of three runs. Shorter is better:
So I’m looking at these charts, and something doesn’t seem right: why is the Linux box 4-5x faster when running Rails? I expected that kind of huge increase with the Haskell tasks, because the tooling makes full use of all the cores. But those tasks are just 3x faster.
And then it hit me: the Rails tests are running in Docker. And Docker is “native” on Linux, but must run in a VM on Mac; the Docker for Mac product. My theory: the disparity is the overhead of Docker containerization on the Mac. I installed the app’s dependencies on each machine, and re-ran the Rails test suite on each, running natively:
The Linux box performed at the same speed! That’s the really interesting part. and its advantage over the Mac computers dropped to just 2x. Leaving the Haskell tests at 3x faster.
- Linux is by far the best platform if the benefits of containers are important.
- Haskell definitely makes use of extra cores for dev tasks, and so they’re great to have in a dev machine.
- New computers are faster, but they’re not that much faster.
- New computers and desktops are fast enough to make a real difference, though, in some key development tasks.