M4 Mac Mini’s Improvement over M1 As a Server

A super-capable and super-affordable machine for a database/app server.

Zhimin Zhan
5 min readNov 21, 2024

Non-Medium Members: This article will be available for free here in two days. In the mean time, you can read this full article now on Substack, which is now my blogging platform.

Over the past week, my daughter and I wrote a few articles reviewing Apple’s M4 Mac Mini.

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) for all my test app instances.

The seven WhenWise instances are all running on one Mac Mini machine.

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.

A recent run of the WhenWise regression test suite consists of 573 raw Selenium WebDriver + RSpec automated tests. This run engaged six BuildWise agents (another set of Mac Minis) for parallel execution.

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).

Booking a test automation training on WhenWise

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 test execution time is 19 seconds against the server. Forgive the fuzziness of the screenshot, I took it via Screen Sharing, which is great for managing a CT lab.

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”.

https://leanpub.com/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.

--

--

Zhimin Zhan
Zhimin Zhan

Written by Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

Responses (1)