Are you considering adding more memory to your Mac?
Maybe macOS is complaining about the lack of space; perhaps your apps are running more slowly than they were before; or maybe you’re craving a performance boost and are wondering whether more RAM is the way to go?
Before you splash out on additional memory, you should do some digging to see whether a memory upgrade is really your best option.
In this article, I’ll show you how to analyse and understand how macOS uses the available memory, so you can better judge whether your Mac really does need more of it.
How to monitor your Mac’s memory usage
You can see exactly how macOS is using its available memory, via the built-in Activity Monitor app:
- Open a new “Finder” window.
- Navigate to “Applications > Utilities.”
- Launch the Activity Monitor app.
- Select the “Memory” tab.
You’ll find lots of useful information about your Mac’s memory usage, in the tables and chart that appear along the bottom of this window.
What is compressed memory?
To better understand the Activity Monitor’s contents, you’ll need some background information on how macOS manages memory – specifically, how it uses compressed memory.
In an effort to make the most of the available memory, macOS will compress the data stored in RAM whenever it’s running low on memory. This compression enables your Mac to do more with less memory, and since the routines used for memory compression are offloaded to additional processors, you shouldn’t notice a performance hit every time your Mac needs to compress or decompress memory.
So, how does macOS decide which memory to compress?
It’s not unusual to have multiple applications running on your Mac at any one time, and not all of those applications will be in the foreground. This means your Mac will often have inactive memory, which is memory that isn’t currently active but still holds data that’s being used by an inactive app. If macOS ever finds itself running low on memory, then it’ll start to compress inactive memory, freeing up RAM that can then be used by other tasks.
Let’s look at an example of how this might work in practice: imagine you’re importing some images into the Photos app, when you’re alerted about a new WhatsApp message. You switch from Photos to WhatsApp and spend some time catching up with your WhatsApp group chat, while Photos remains open but inactive in the background. If there’s a significant amount of free RAM available, macOS won’t perform memory compression, but if it starts running low on memory, then it may compress Photos’ memory, freeing up RAM that can then be used for currently-active apps, such as WhatsApp.
Measuring the level of memory compression
The Activity Monitor features a “Memory Pressure” timeline that indicates how much memory is being compressed, and warns you when your Mac starts paging to disk, which happens when compression alone isn’t meeting your Mac’s memory demands.
The memory pressure chart displays three colours:
- Green. No compression is occurring. Ideally, the memory pressure chart should be green, as this indicates that your Mac has adequate RAM available for the tasks it needs to perform.
- Yellow. Compression is occurring. This indicates that inactive files are being compressed to free up additional RAM.
- Red. There’s no longer enough inactive RAM to compress, and your Mac has started paging to virtual memory, which can result in a noticeable drop in your Mac’s overall performance.
The height of the colour indicates the extent of the compression or paging that’s occurring.
If the memory pressure chart only turns red briefly when you’re performing memory-intensive tasks, such as opening an app, then you don’t necessarily need to splash out on additional RAM. Instead, you could try reducing the number of apps you have open at any one time, or the number of applications that launch at login, as this may be enough to improve your Mac’s memory usage. You only need to worry if the timeline turns red and remains red for a significant period of time, as this is an indication that your Mac might benefit from some additional RAM.