M4 Mac Mini's Improvement over M1 As a Server
A super-capable and super-affordable machine for a database/app server.
Over the past week, my daughter and I wrote a few articles reviewing Apple’s M4 Mac Mini.
M4 Mac Mini: A Perfect Build Machine for E2E Test Automation Labs (my pre-hands-on predication on the announcement)
Unboxing and Benchmarking M4 Mac Mini as a Test Automation Engineer.
Part 1: Setup and Results
Part 2: Analyse & SuggestionsMac Mini M4 over M1 for Software Testing and Development Engineer
In addition to my role as a test automation engineer and coach, I develop and maintain several large-scale applications. As a software product owner, I assess infrastructure costs and ensure value for money. This weekend, I upgraded a server machine to an M4 Mac Mini, and in this article, I share my insights and key takeaways from the experience.
By the way, I use one app server and one database server (both on the same Mac Mini) to host all my test app instances.
A full regression testing for me means running a whole suite of user-story-level E2E (UI) tests against them, via my international award-winning BuildWise CT Server.
The above setup and my Continuous Testing process enable ‘Daily Production Releases’ practice for all my web apps. Also, this makes “defect tracking’ mostly unnecessary.
As a Database Server
In the context of software development, servers can be broadly classified into two major categories:
Database Server
Application Server
Let’s first evaluate the performance improvement as a database server.
The two machines:
M1 Mac Mini (2020, 8GB)
M4 Mac Mini (2024, 16GB)
both run the same MySQL server (v9) with identical database content (my WhenWise App).
Full database reset (seeding, via code that interacts with the database intensively):
M4 Mac mini (2024): 3.5
M1 Mac mini (2020): 7.1
iMac Intel (2015): 9.8
Quick database reset (seeding by mostly executing a large SQL statement):
M4 Mac mini (2024): 0.15
M1 Mac mini (2020): 0.25
iMac Intel (2015): 0.50
I have to say, the performance enhancement is quite big: about 70%-100% better.
How Much Faster than M4 Mac Mini as an App Server?
1. E2E Test Execution from BuildWise Agent
In my daughter’s benchmark testing yesterday, she ran the same automation test on three different Mac Minis provided by BuildWise Agent as the testing machines. The execution time for the test against the WhenWise Test Server instance, running on an M1 Mac Mini (2020), was 20.93 seconds.
I then switched the target server to an M4 Mac Mini (the only change) and reran the same test.
The timing is now 18.99 seconds. About 9% improvement, the gain is solely by upgrading from the M1 to the M4 Mac Mini.
This result aligns with my expectations, as server speed is only one component of the overall automated test execution time. The total time also depends on factors such as:
Loading the scripting language runtime
Launching a browser instance
The raw execution speed of the scripting language (a very minor factor)
The framework invoking the driver to locate a control in the browser
Browser performance (rendering and executing JavaScript)
The quality of the scripting itself
Considering all these factors, a 9% raw improvement in a single-client scenario is quite satisfactory.
2. Performance Testing (API and UI)
The simplest and most meaningful way to evaluate a server’s performance is by measuring its response times for a series of requests — essentially, API testing, if you prefer the term.
Long-time readers might be aware I wrote the book: “Practical Performance and Load Testing”.
The BuildWise server includes a performance testing module, so I naturally conducted two runs for comparison.
Mac Mini M1 (8GB) as the server
Mac Mini M4 (16GB) as the server
Astute readers can figure out from the above numbers:
In end-to-end UI performance tests, the difference is minor (as I stated earlier), e.g. “(UI) View Business Booking Page”: 3.409 vs 3.212.
However, the raw server response time has significantly improved. Examples include:
- “Change password”: 0.037 => 0.015
- “Visit home page”: 0.039 => 0.016
- “Reset password (quick)”: 0.386 => 0.228
Summary
The M4 Mac Mini performs exceptionally well as both a database and application server. At just $599, it offers incredible value.
Related reading: