Mac|Life

How it works: Unified memory

Discover the secret to the incredible performanc­e behind the M1 Macs

- CARRIE MARSHALL

APPLE’S NEW M1 Macs introduce a new kind of Mac processor and a new kind of memory too. Apple calls it Unified Memory Architectu­re (UMA), and it’s one of the reasons M1 Macs are so incredibly fast.

Since the earliest PCs, the core of the system has been modular. You have a processor at the center, and it sends data to and from system memory and to the graphics card. In recent years, third–party graphics cards have effectivel­y become mini–computers in their own right, with ever faster GPUs and bigger memory, and often price tags to match. For example, the Nvidia GeForce RTX 3090 has 24GB of 19,500MHz GDDR6X memory and a price tag of around $2,500.

The GeForce is an extreme example but it demonstrat­es how powerful graphics cards have become, and that power isn’t just for making things look good on screen. Their powerful processing means they can give the system a helping hand with intensive tasks, for example they can slash the amount of time it takes to render and export video. They’re really useful in machine learning applicatio­ns, which can be very computatio­nally intensive, and they’re particular­ly good for image recognitio­n. But while the lines between the CPU and the GPU have become blurry, the lines between system memory and graphics memory haven’t.

HOW DOES THE “OLD” TWO–PROCESSOR SYSTEM WORK?

The CPU and GPU may share the workload, but they don’t share their memory with each other. That means there’s a lot of travel going on, and it’s not all going at the same speed.

To return to our admittedly extreme GeForce card, its memory runs at 19,500MHz. The system memory in a Mac Pro runs at 2,666MHz. Even with much more modest graphics cards, data traveling between system memory and the CPU often isn’t going as fast as data travels between the graphics memory and its GPU. And data is also duplicated. It’s taken from storage to system memory, then sent across to the GPU.

HOW DOES UNIFIED MEMORY WORK AND WHY IS IT “FASTER”?

What if data didn’t need to be duplicated, and it traveled at the same speed no matter where it was going? That’s what unified memory is all about. Thinking differentl­y about memory.

As the name suggests, unified memory brings everything together. It does that by combining them on the same System on a Chip (SoC). Whether it’s an iPhone 12 or

an M1 Mac, the SoC brings the CPU, the GPU and the RAM together in the same substrate. The SoC includes other key components too, such as the Neural Engine for AI processing. That achieves a number of things…

By having everything physically closer, it reduces the distance data has to travel, and because the data is shared there’s no need to duplicate it: the GPU can access the same data at the same memory address as the CPU, so there’s no need to make another copy. Because CPU and GPU share the same memory, there’s no slow lane for CPU data. And, as a bonus, the SoC uses less energy and runs cooler too.

Unlike standard PCs, where there’s a limit to the memory available to the GPU, integrated memory is dynamicall­y allocated, so if the GPU needs more it takes some of the CPU’s share and vice versa.

HOW DOES THE M1 SYSTEM COMPARE TO INTEL MACS?

Apple claims, “This dramatical­ly improves performanc­e and power efficiency. Video apps are snappier. Games are richer and more detailed. Image processing is lightning fast. And your entire system is more responsive.” Early benchmarks for the first M1 Macs are astonishin­g, and we’ve seen an 8GB Mac mini running hundreds of plug–in– packed tracks in Logic Pro without a single stutter — a feat that would bring our 16GB Intel iMac to a shuddering halt.

WHAT IF YOU RUN OUT OF MEMORY?

That’s when virtual memory kicks in: your Mac will start to use physical storage for short–term memory. That isn’t as catastroph­ic as it used to be as the difference in speed between unified memory and a modern SSD isn’t as dramatic as the difference between memory and a spinning hard disk.

ARE THERE ANY DOWNSIDES TO USING UNIFIED MEMORY?

Yes. The most obvious one is that you can’t upgrade it — you’re stuck with whatever memory, GPU and storage configurat­ion came out of the Apple factory. At the moment that means you’re limited to 16GB on an M1 MacBook Pro.

Of course, that’s going to increase over time as the tech improves. 16GB will become 32GB, then 64GB, and so on. And Apple is already working on M series processors with more CPU and GPU cores.

Another possible drawback is that apps may end up using the lion’s share of memory to drive display and graphics. If there wasn’t enough memory for the rest of the app, it’d have to use slightly slower virtual memory instead. That’s unlikely to be an issue with everyday stuff, but it’ll be interestin­g to see what power users encounter when they push their M1 Macs to the limit.

 ??  ?? The M1 isn’t just a new kind of Mac processor. It’s a whole new way of managing Mac memory too.
The M1 isn’t just a new kind of Mac processor. It’s a whole new way of managing Mac memory too.
 ??  ?? In traditiona­l PCs, the CPU, GPU and RAM are separate. In an M1, they’re all in the same substrate.
In traditiona­l PCs, the CPU, GPU and RAM are separate. In an M1, they’re all in the same substrate.
 ??  ??
 ??  ?? Many of Intel’s chips include integrated graphics where the GPU accesses some system memory.
Many of Intel’s chips include integrated graphics where the GPU accesses some system memory.

Newspapers in English

Newspapers from Australia