TECH

The M4 Mac mini is incredibly cool in a compute cluster, but not very efficient

A cluster of M4 Mac mini – Image credit: Alex Ziskind/YouTube

Last updated 15 minutes ago

There's a way use a set of M4 Mac minis in a cluster, but the benefits really only exist when using high-end Macs.

While most people think that a more powerful computer means buying one expensive machine, there are other ways to do large amounts of computing. One concept that has been around for decades is to use multiple computers to process a project.

The concept of cluster computing revolves around a computationally intensive task that is distributed across two or more processors. By working together to perform tasks in parallel, the result is a significant reduction in processing time.

In a video posted to YouTube on Sunday, Alex Zyskind demonstrates a cluster computing setup using an M4 Mac mini. Using a set of five Mac minis stacked in a plastic frame, he sets up a task that is then distributed among them for processing.

Subscribe to AppleInsider on YouTubeSubscribe to AppleInsider on YouTube

While typical home cluster computing setups rely on an Ethernet network connection to communicate between nodes, Zyskind instead leverages the speed of Thunderbolt using Thunderbolt Bridge. This significantly speeds up communication between nodes, and also allows larger data packets to be sent, saving processing power.

Ethernet can run at 1 Gbps normally, or up to 10 Gbps if you pay for an Ethernet upgrade on some Mac models. Thunderbolt Bridge can run at 40 Gbps for Thunderbolt 4 ports, or 80 Gbps for Thunderbolt 5 on the M4 Pro and M4 Max models when running bidirectionally.

Better than GPU Processing

Ziskind notes that using Apple Silicon instead of a PC with a powerful graphics card for cluster computing can have advantages.

For starters, GPU processing relies on having a significant amount of video memory available. On a graphics card, that might be 8GB on the card itself, for example.

Apple's use of unified memory on Apple Silicon means that the Mac's memory is shared between the CPU and GPU. This means that the Apple Silicon GPU has access to much more memory, especially on Mac configurations with 32GB or more.

Then there's power consumption, which can be significant for a graphics card. High power consumption can equate to higher ongoing operating costs.

In contrast, Mac minis have been found to use very little power, and a cluster of five Mac minis running at full power uses less power than a single high-end graphics card.

MLX, not Xgrid

To run the cluster, Zyskind uses a project we've already talked about. It uses MLX, an open-source Apple project described as “a massive framework designed for efficient and flexible machine learning research on Apple Silicon.”

This is vaguely reminiscent of Xgrid, Apple's long-dead distributed computing solution that could manage multiple Macs for cluster computing. That system also allowed Mac OS X Server to take advantage of workgroups of Macs on the network to do processing when they weren't being used for anything else.

However, while Xgrid worked for large-scale operations that were very well funded at the corporate or federal level, as AppleInsider's Mike Wurtele can attest, it didn't translate well to smaller projects. In ideal and specific situations and specific code, it worked fantastically, but home-made clusters tended to perform poorly and sometimes be slower than a single machine doing the work.

MLX does change that a bit, as it uses the standard MPI distributed computing methodology to do the work. It can also be run across multiple Macs of varying performance, without necessarily shelling out for hundreds or thousands of them.

Unlike Xgrid, MLX seems to be much more geared towards smaller clusters, i.e. the crowd that wanted to use Xgrid but kept running into issues.

A Useful Cluster for the Right Reasons

While combining the power of multiple Mac minis into a cluster sounds appealing, it's not something that's going to benefit everyone.

For starters, you won't see the benefits for typical Mac use cases, like running an app or a game. It's designed for handling large data sets or highly intensive tasks that benefit from parallel processing.

This makes it ideal for purposes like building an LLM for machine learning research, for example.

It's also not exactly easy for the typical Mac user to use.

Plus, the performance boost isn’t necessarily all that useful to the average Mac owner. Zyskind found in tests that simply buying an M4 Pro model delivered more performance than two M4s running together using LLM.

Clusters can be really useful when using multiple high-end Macs together

A cluster like this comes into play when you need more performance than you can get from a single high-end Mac. If a model is too big to run on a single Mac, for example due to memory constraints, a cluster can offer more total memory for the model to use.

Zyskind suggests that at this point, it’s better to use a high-end M4 Max Mac with a huge amount of memory than a cluster of lower-end machines. But even then, if your requirements somehow extend beyond the highest configuration of a single Mac, a cluster can help here.

There are still some limitations to consider, though. While Thunderbolt is fast, Zyskind had to resort to using a Thunderbolt hub to connect the nodes to the host Mac, which reduced the available bandwidth.

Directly connecting the Macs to each other solved that problem, but then there were issues like the number of Thunderbolt ports available to connect multiple Macs together. That could make scaling the cluster problematic.

He also ran into thermal quirks where the host Mac mini ran particularly hot while the nodes ran at a more reasonable level.

Ultimately, Zyskind found the Mac mini cluster tower experiment interesting, but he doesn’t intend to use it long-term. Still, it’s still relatively early days for the technology, and in cases where you’re using multiple high-end Macs for a reasonably tight setup, it could still work just fine.

Follow AppleInsider on Google News

Leave a Reply