His Airness - Apple Silicon M1
On Nov 10th Apple confirmed the rumors that they are cutting ties with Intel CPUs and starting using their own - Apple Silicon ARM-based CPUs. While that came as a surprise to some, Apple has been working for years to make this transition. They don’t want to rely on Intel more, and Intel has arguably slowed down the evolution of CPUs in the last few years.
Long story short, Apple has announced two M1 powered MacBooks as a start - MacBook Air with passive cooling and with all physical keys and MacBook Pro with active cooling and Touch Bar.
I wanted to wait for the second iteration of Apple Silicon chips and MacBooks as I thought that the transition process won’t be that smooth. I remember the transition from PowerPC to Intel - it wasn’t nice and I expected general problems: slowness, not-so-fast adoption, and just regular bugs. After the first reviews popped in they were surprisingly positive - even from hard-core Apple haters. Again, I opted-in to wait. I had my MacBook Pro 2018 15.4" with i7 and 16GB RAM, why would I need a new computer? Well, again, I was wrong, as the IT professionals, devs, SREs, started showing numbers from new MacBooks in their regular work and the general feeling is that we have something magical here.
I was hooked. Pulled the trigger and ordered MacBook Air M1 with 16GB RAM.
Big Sur came out with a shiny new design which I don’t like completely. There is much-unused space, rounded corners of the Windows, etc. But, this is not about Apple’s software, more of third party software that I daily use. I will just list the ones that have native versions. You can always use https://isapplesiliconready.com/ to check if some software not listed here has a native ARM version. Native:
- VSCode (Insiders version)
- Parallels Preview
- nodejs (npm)
Non-native (for now):
- Stay (support incoming in 1.4)
- Golang and all tools related to it (kubectl, helm, etc)
Golang 1.16 is coming out this or the next week and then all tools related to it will support aarch64.
When the app isn’t complied natively, it goes through a transition layer called Rosetta 2. Rosetta has to “translate” the app for Silicon to “understand” and the first start of the app lasts 5-20s. Each next start of the app is like a native app, no matter if you restart your computer or not.
Brew - to ARM or not to ARM
With 3.0.0 version, Brew officially supports installations in
/opt/homebrew. For now, the preferred way is to have it running both, one in the (good) ol'
/usr/local directory, and the other in
/opt/homebrew. After that you should put both in the path, but
When Apple announced the M1 the biggest problem with it is how to run virtualization, aka Windows and Linux in virtual machines. Unfortunately, I have to use Windows for a few things - managing my company’s bank account and some government access. Windows 10 has insider preview for ARM64, and virtualization software Parallels has Technical Preview with support for arm64 of W10/Ubuntu.
My experience with it has been silky smooth - it passes through my USB token, Java e-banking software installs correctly and everything works. Kudos Parallels devs!
Docker technical preview
Docker is a go-to environment for almost any dev these days. Its performance on Mac has historically been a major pain, mostly because of the way how it goes around macOS limitation to use the filesystem. Read no further, it is still awful, but this time a bit better because everything works faster because of the new SoC.
Other than that - you will need arm64 images of your apps to achieve better performance. You can still run the amd64 image without any problems via QEMU emulation (Docker does it automatically if it doesn’t find arm64 version of the container), but it will be slower.
I have set up our images at The Remote Company to be built on GitHub Actions for both amd64 and arm64 images and they work pretty much great. Other than that, there are still performance issues vs the Linux version of Docker.
Why Air instead of Pro for power users?
This machine is cold. Colder than the heart of my mother-in-law. Hopefully she won’t read this, but my wife will. I regret nothing! Please take care of my cat. It has no fans so it is silent. Of course, I generally run things that require a short burst of performance, not constant performance like rendering a video, then I would suggest you go with MacBook Pro as its performance is a little bit better as it doesn’t throttle under high load for a long time.
Other than that, I dislike touch bar from the bottom of my heart. Air still has physical keys and that is what nudged me to it. Apple has been stubborn for years with the touch bar that 99% of power users are annoyed with, but the reports say that with incoming 14" and 16" MacBook Pros they will finally go back to physical keys.
Good business model - introducing old things as new that users will like.
Let’s face it, all Apple keyboards after MacBook Pro 2015 have been abysmal. The butterfly keyboard is a failure that broke in all 3 of its iteration. Last year Apple announced that they are going back to the old-style keyboard on MacBook Pro 2020, and they have continued with that practice on M1 MacBooks. The new Magic keyboard is amazing - it feels even better than the old favorite MacBook Pro 2015.
I guess anything is better than the piece of plywood called MacBook Pro 2016-2020 keyboard. May it rest in peace or for someone, literally in pieces.
I almost forgot one big improvement. Battery life on M1 is crazy. I regularly get 12-16 hours, depending on the usage, and I don’t even use Safari. Knowing that you can go a full day without charging the battery or even two working days is a great thing to have.
NPM performance benchmark
Now, a few benchmarks. I compared nodejs compilation time on both of my machines - MacBook Pro 2018 (i7 6c, 12t, 16GB RAM) and MacBook Air M1. Both have nodejs v15.8.0 natively installed and both have the tests running the same commands in docker image
|npm install||40.3s||MBP 15 2018|
|npm install||9.8s||MBA M1 2020|
|npm run dev||25s||MBP 15 2018|
|npm run dev||12.8s||MBA M1 2020|
|npm install||3m22s||MBP 15 2018|
|npm install||1m47s||MBA M1 2020|
|npm run dev||1m5s||MBP 15 2018|
|npm run dev||37s||MBA M1 2020|
You can conclude yourself, but in most of the tests, Silicon has been more than 50% faster.
The only problem that I had is that my USB-c screen stopped showing the correct color range as Macbook now recognizes it as a TV, so it has a limited color output. I use Caldigit TS3+ and LG38WK95-c and my workaround was to buy a USB type-c to HDMI adapter and connect it to Caldigit and colors are now fine. A little bit frustrating, but a software problem that I hope some future Big Sur version will fix.
MBA is the best value for money in the market currently. ~1600€ for a 16GB/512SSD version that outperforms even desktop CPUs in a small and portable package as Macbook 13" is truly astonishing and I’m excited to see how will new Pro machines perform with improved M1s and more RAM as M1 is limited to 16GB.