Introducing Crunchy Data Warehouse: A next-generation Postgres-native data warehouse. Crunchy Data Warehouse Learn more

PostgreSQL Benchmarks: Apple ARM M1 MacBook Pro 2020

Avatar for Greg Smith

Greg Smith

4 min read

This week Apple started delivering Macs using their own Apple Silicon chips, starting with a Mac SOC named the M1. M1 uses the ARM instruction set and claims some amazing acceleration for media workloads. I wanted to know how it would do running PostgreSQL, an app that's been running on various ARM systems for years. The results are great!

The OSS community around the homebrew project already qualified their PostgreSQL package as working on M1, and with some recompiling work that all worked as expected:

$ /opt/homebrew/bin/psql -c "select version()"
PostgreSQL 13.0 on arm-apple-darwin20.1.0, compiled by
Apple clang version 12.0.0 (clang-1200.0.32.28), 64-bit

I need some additional software for my benchmark toolkit, and the only compile problems I saw were Qt and Python's numpy; those two seemed straightforward to fix once someone gets to them.

My last blog entry introduced my basic method of using pgbench-tools to look at past MacBook Pro models. I said there Apple needed to exceed "15K TPS single/60K TPS all core" on PostgreSQL to fully embarrass Intel. Well, they outperformed expectations:

MacYearly-M1

32K single/92K all core is so fast for a laptop, I need to pull in some other hardware to put it into perspective. Here's a data table for all the results behind the graph, plus adding two generations of AMD's Ryzen desktop hardware:

server12481632
2011 16GB MacBookPro8,272521464420471307493289432647
2012 16GB MacBookPro9,177811586122380347433829436754
2015 16GB MacBookPro11,497701779522372383414504843497
2017 16GB Intel NUC7i3BNB127892087033649310533202932409
2019 16GB MacBookPro16,1143532758843784450896160358705
2019 64GB MacBookPro16,1141052873346836611676208369101
2019 16GB Intel NUC10i5FNB154442749643341700156192762584
2020 8GB MacBookPro17,1321985282896536970429513092663
2018 64GB Ryzen 7 2700X11624221534164869399138431123466
2019 64GB Ryzen 9 3950X3776869162133943206684258722306185

This graph is amazing to me:

MacAMDOf course Intel has Xeon processors that have pushed single core performance higher than these laptop-oriented Intel results. But look at that big cluster below 5 clients, showing how long they've been stuck in the same performance range when power and heat is limited. I mentioned last time Intel had only doubled performance in the 8 years of MacBook models I looked at, which is not industry leading performance.

AMD has been doing a lot better, getting their single core boost competitive in their 3000 series. Even last year's 3950X with its mandatory water cooling is barely faster than the M1 until you hit 8 clients.

If Apple can push the M1 design into larger amounts of memory and add a few more cores, it could be a fierce midsize server competitor. That's not going to disrupt the big industry push toward hosting things on giant cloud systems, where data centers want >=48 processors for a server to be worth installing. There are cloud scale ARM servers out there, and Apple's ARM instruction set Macs make developing for that platform easier. I'm looking forward to the competition of a four way race between Intel, AMD, Apple, and the other ARM designers.

The M1 is a great step forward for developers who can take advantage of it. Let's hope the obvious virtualization issues are sorted out in the near future. A lot of developers need tools like Docker and VMs to build modern cloud software. Until that area is sorted out, the M1 Macs aren't suitable for everyone. Make sure you understand your requirements and what's supported before you consider buying one.

To make this article complete, here's the detailed list of the hardware I tested for this tour of benchmark results, and you can drill into detail about the systems I have here by digging into my Geekbench Profile.

SystemCPU ModelCPUs
2011 16GB MacBookPro8,2Intel i7-2860QM CPU @ 2.50GHz8
2012 16GB MacBookPro9,1Intel i7-3615QM CPU @ 2.30GHz8
2015 16GB MacBookPro11,4Intel i7-4770HQ CPU @ 2.20GHz8
2017 16GB Intel NUC7i3BNBIntel i3-7100U CPU @ 2.40GHz4
2019 16GB MacBookPro16,1Intel i7-9750H CPU @ 2.60GHz12
2019 64GB MacBookPro16,1Intel i9-9980HK CPU @ 2.40GHz16
2019 16GB Intel NUC10i5FNBIntel i5-10210U CPU @ 1.60GHz8
2020 8GB MacBookPro17,1Apple M18
2018 64GB Ryzen X470AMD Ryzen 7 2700X16
2019 64GB Ryzen X570AMD Ryzen 9 3950X32