Upgrading RAM can boost performance more than upgrading CPU/GPU. Activity Monitor can make you think you're using less memory than you really are.

MrTemple

macrumors regular
Original poster
Jun 11, 2013
185
309
Canadian Pacific North Wilderness
TL;DR First:

You might wind up with a faster machine if you put an extra $400 into 64GB RAM instead of into CPU/GPU.

Just-after-restart benchmarks are useful. But what really matters for you is your mid-process actual usage.

People seem to want to argue whether or not less ram is usable (of course it is, MacOS has FANTASTIC memory management mitigation techniques), but this post is about knowing what you ACTUALLY gain from RAM/CPU/GPU upgrade money.

People also are proving one of the key points of this post by arguing against what MacOS is reporting as the amount of memory used, using instead the confusingly low values in Activity Monitor.


MacOS's memory management is magical, but it DOES affect your performance.

Apple does all kind of memory management wizardy to maximize the use of your physical memory. This is a sort of 'soft ceiling' where the swapping and caching and compressing happens in order to avoid the 'hard ceiling' of memory thrash.

As amazing as these techniques are (they greatly extend the headroom before hitting the 'hard ceiling'), they do slow your machine down more than ANYTHING else (CPU/GPU/etc).


How big a hit to performance? Will you get a faster machine by throwing $400 into more RAM or more CPU/GPU?

The performance hit from this excellent memory management is going to affect a whole lot more people a whole lot more often than hitting their CPU or GPU limits. Especially if their MBP is their every-day-use machine that gets multi-tasked up the wazoo.

I got away with 16GB for 6+ years, because this memory management magic is so damned good. I almost never hit max my CPU or GPU, but my performance is just about always affected a few percent (much more when my memory pressure is in the yellow or red).

Importantly, you may be requesting more memory than you actually think you are. You may be hitting this memory management performance 'soft ceiling' when you don't think you are.

If you're speccing out upgrades, it's important to know where your performance leechs actually are. You can throw $400 into CPU/GPU, but wind up with a slower machine than if you put that into memory.

This depends a TON on personal use. But you gotta make sure you actually know your personal use!


Activity Monitor can be misleading...

If you only look at Activity Monitor, you might not realize that your mac is actually well into the shell game of memory management, and your performance has taken a big hit.

Right now Activity Monitor shows all-green memory pressure and says I'm using 12.3GB of RAM, with only 1.0GB compressed. No problem right?

Screen Shot 2019-11-18 at 8.49.49 AM.png


However, you'll notice that my system is actually asking for over 22gb or ram, so it's swapping and caching 10gb of memory (all compressed, FYI).

You can confirm this by adding up all the values of uncompressed and compressed memory for the processes in the memory tab of Activity Monitor (it's easily copy-pastable into excel/numbers).

It's not like Activity Monitor is outright lying, but let's face it, Apple wants the less tech-savvy people who shelled out thousands to see a nice green memory pressure graph with memory used less than the physical memory.

Edit: Here's a cap of my excel sheet. The two "Total (GB)" columns are sums of the "Memory" and "Compressed Memory" columns below.

Screen Shot 2019-11-18 at 10.31.55 AM.png



Edit again: Because people are somehow refusing to believe that the 22gb of memory used for such a light workload, here's a screencap of the results of a top command (top -l 1 -S -n 0) taken at about the same time which sums up the memory state.

Screen Shot 2019-11-18 at 9.13.49 PM.png


Notice that:
  1. All 16gb of physical memory is used (all but 141mb)
  2. Another ~6.2gb of memory has been swapped to disk
That's right in line with the 21.8gb of memory shown when I added up all the values in the "Memory" column in Activity monitor.


22gb for what's actually a super light load (in 2019, it'd be even higher years down the road).

Currently my mac has been running for a few weeks, but I just got back from vacation and closed up just about everything before I went. Right now this is as close to a 'skeleton crew' state of apps I have open:

Finder (with 6 windows open)
Mail
Calendar
Messages
iTunes
Safari (with only 13 tabs, which is WAAAAAY less than normal for me)
Notes
BBEdit (with very few, very small docs open)
Terminal (with only one window just opened)
Activity Monitor
Excel (just opened with only one very minimal sheet for playing with these numbers)
Alfred
iStat Monitors

That's actually a SUPER LIGHT load for me. I'm usually not very spartan with my safari and finder tabs and I've often got a bunch of apps open. And I switch between them so much I bet my Mac could diagnose me with ADHD.


I always max the RAM.

I'm a BIG advocate of ALWAYS maxing the ram in a non-upgradeable mac, so I've ordered 64GB in my new 16-inch. It's the single biggest thing you can do to increase the longevity of your mac. My late-2013 15-inch has 16gb and after six years, it's just starting to chug.

But if I trusted Activity Monitor, I'd think 16gb is still overkill.

If you plan to upgrade in a few years, or if you're really spartan with your use, you can probably get away with 32gb. But if you plan to hang on for a while, maxxing to 64gb can be the biggest performance and longevity boost you can make. (Not to mention, it significantly increases the resale value a few years down the road when 32gb will be the new minimum.)
 
Last edited:

Stephen.R

macrumors 68000
Nov 2, 2018
1,821
1,627
Thailand
Cached files in that table is files that are cached in physical memory. Used memory + cached files = your physical
Memory, and another ~6gb of currently idle app memory has been moved to swap.

Also keep in mind that swap isn’t necessarily bad. If the program is idle and another process needs to load a heap of data, using it for file caching (and letting the first app be swapped out) is likely to give you better performance.

For reference, my mini has 64Gb and I’ve seen it swap a few gb here and there.
- - Post merged: - -

I should add: I agree that getting as much memory as you can afford is a good idea. But I also wanted to clarify about the swap vs cached files stuff.
 

MrTemple

macrumors regular
Original poster
Jun 11, 2013
185
309
Canadian Pacific North Wilderness
Cached files in that table is files that are cached in physical memory. Used memory + cached files = your physical
Memory, and another ~6gb of currently idle app memory has been moved to swap.
Correct that cached memory is still in-RAM, but that's still compressed and not quite top-speed available for use (part of the magic wizardry Apple does).

Copy the memory tab process list into excel and add up all the uncompressed and compressed memory requested by each process and you'll see that all your swap and all your cache is compressed.

There's a cascade of space-mitigation that happens when you hit the memory 'soft-ceiling'. Active memory gets compressed and cached, then when more space is needed, it gets dumped to disk as swap.

Importantly, reversing each of those processes is a fairly substantial performance hit over active memory speeds.

Also keep in mind that swap isn’t necessarily bad. If the program is idle and another process needs to load a heap of data, using it for file caching (and letting the first app be swapped out) is likely to give you better performance.
I don't know what you mean by 'bad', but it's slower than live memory in RAM. That's the point. And swapping is the last-ditch resort for out-of-memory situations.

In a conversation about 'how much ram do I need', I consider swapping to be bad.

And for many people who use their MBP as their primary every-day use machine, the caching and swapping is a much bigger performance hit than they'll encounter with the CPU and GPU ceilings.
 

MrTemple

macrumors regular
Original poster
Jun 11, 2013
185
309
Canadian Pacific North Wilderness
I didn't notice that because nothing you posted shows it. I think you're confused.
As I mentioned, I summed the total memory requested in excel. Here's the totals.

One of us was confused.

Screen Shot 2019-11-18 at 10.31.55 AM.png


Edit: Just saw your edit:

Your system is using 12.33GB of RAM.
My system processes are requesting 21.83gb. All 16gb of RAM are used, 12.33gb are active top-speed available, 3.6gb are compressed and left in-memory, and 6gb more memory was compressed and swapped to disk.

Far cry from 12.33gb.

See how you were mislead by Activity Monitor?
 
Last edited:
  • Like
Reactions: miroki

Stephen.R

macrumors 68000
Nov 2, 2018
1,821
1,627
Thailand
Correct that cached memory is still in-RAM
They’re cached files. There’s no point the data being “swapped” - you may as well just read them from disk again.

I don't know what you mean by 'bad', but it's slower than live memory in RAM.
Well of course it is, it’s on disk/SSD.

But if the program isn’t actively using those pages, and another active application will benefit from memory cached access to files, that’s likely to give the user a more responsive system/app. Stuff in swap is inherently not active - if it were it wouldn’t be swapped.
 

chabig

macrumors 603
Sep 6, 2002
6,309
3,518
I'm not sure that accurately represents memory use. It might represent allocated address space. I'm also not sure it's appropriate to add uncompressed and compressed memory. The compressed memory might be a subset.
 

MrTemple

macrumors regular
Original poster
Jun 11, 2013
185
309
Canadian Pacific North Wilderness
I'm not sure that accurately represents memory use. It might represent allocated address space. I'm also not sure it's appropriate to add uncompressed and compressed memory. The compressed memory might be a subset.
You certainly aren't sure.

I didn't add compressed and uncompressed. Those are totals of each column. Adding them together would be 32gb, which would be incorrect.
 

Donnation

macrumors 65816
Nov 2, 2014
1,115
1,185
You are paying for RAM that you don't need and aren't using. And you are going to lose money on your MBP no matter what when you sell it down the road. The resale value is going to be higher only because you spent way more money on it than you needed to.
 

Krevnik

macrumors 68040
Sep 8, 2003
3,385
706
Green memory pressure doesn't mean "no memory pressure" though. So is Activity Monitor lying, or is it not being read correctly?

The total "load" on the system from the user in your case is just over 18GB (ignoring that it's compressed for the moment). The problem is that Apple's memory management is prioritizing caches over certain forms of inactive memory. The real problem is that Apple doesn't say why it does this, or provide good tools to understand what the swap is doing, so it's hard to tell exactly what's being given up, and how much it matters.

A couple reasons Apple may have for being more aggressive pushing things to swap in favor of cache that I can think of:
  • With fast SSDs, the cost of a page miss and lookup in swap is nothing like the old days.
  • Predictive caching may lead to higher gains than simply assuming an open app should be allowed to consume RAM.
If your goal is to keep memory pressure at 0, then yeah, buy as much RAM as you can. And if you are dealing with spinning platters, it's still probably a good idea (i.e. Fusion Drive in the iMac).

But generally, if you are in the green range, with a recent machine running these 2+GB/sec SSDs, it's not as bad as you'd think. But browsers can consume a hilarious amount of memory, which is somewhat depressing because they are probably the most commonly used app on any computer, and it's common for users to keep large numbers of tabs open. I guess at some point it was decided that pushing memory management onto the OS was the right call for browsers. I wouldn't be surprised if "pushing stuff out to swap" was intended by design when it comes to having a couple dozen tabs open.

That said, with Xcode and browsers, and all the other memory hungry nonsense I run, I'm getting a 32GB machine. And I can certainly agree that 16GB can feel constraining for folks if they aren't doing just office work. But 64GB still seems like something for those who know they *need* it. RAM usage hasn't really been exploding these last five years like it used to in the past. Well, except for all these web app wrappers floating around maybe. :|

I've been on 24GB for the last 5 years quite happily. 32GB should give me the headroom for years to come. If there was a 48GB option, maybe I could have been tempted into it.
 
  • Like
Reactions: miroki and ascender

FlyingDutch

macrumors 6502a
Aug 21, 2019
854
712
Eindhoven (NL)
You are paying for RAM that you don't need and aren't using. And you are going to lose money on your MBP no matter what when you sell it down the road. The resale value is going to be higher only because you spent way more money on it than you needed to.
He’s basically suggesting 64 giga for internet browsing and office automation. That’s insane.
 

MrTemple

macrumors regular
Original poster
Jun 11, 2013
185
309
Canadian Pacific North Wilderness
That’s absolutely false. With such a light usage 64 giga is a waste of money, and will be even in a few years.
You need such a huge amount of ram only if you are developing with a few VMs opened at the same time.
What's absolutely false?

I mentioned that I was currently running a much lighter load than normal, and it's STILL asking for 22gb. I didn't run these totals when I'm in full-on multi-task mode, but I suspect the total memory requested is well over 32gb.

No VMs at all. Safari tabs are beasts (especially for many modern web-apps) and I often have dozens open. I also have some fairly ginormous excel sheets that I have open at the same time. Often some pretty big text files I'm working with in BBEdit.

During heavy use, my memory pressure graph can go well into the yellow and dip into the red. As you see here, I'm at 22gb on a 16gb RAM machine and the pressure is below 50%.

But this isn't about my usage. This is about how easy it is to be mislead by how Activity Monitor displays.

You are paying for RAM that you don't need and aren't using.
Thanks for the RAMsplaining. 🤣
 

Krevnik

macrumors 68040
Sep 8, 2003
3,385
706
During heavy use, my memory pressure graph can go well into the yellow and dip into the red. As you see here, I'm at 22gb on a 16gb RAM machine and the pressure is below 50%.
Yet, isn't when you start seeing yellow and red that folks say: Hey, maybe you want more RAM?
 

MrTemple

macrumors regular
Original poster
Jun 11, 2013
185
309
Canadian Pacific North Wilderness
Yet, isn't when you start seeing yellow and red that folks say: Hey, maybe you want more RAM?
My point is that folks may be surprised at the performance mitigation that's happening LONG before they hit the yellow memory pressure.

And I agree with your previous post, it's still fully usable! They've done real magic with memory management. That's why I've gotten away with 16gb for 6+ years.

But if you're looking at cost/benefit of the upgrades on a new mac, it's important to realize that the memory management magic MacOS is doing is going to impact your performance a heck of a lot more than say, the $200 upgrade from the 2.3->2.4 i9.

Lots of tech-savvy people (like the two above us) think they're not even hitting that soft-ceiling where performance has begun to be impacted.


That's an extremely naive way of understanding how memory management works at the OS level... but if it makes you feel better, more power to you, your money you RAM chips, get as many as you can!
What exactly is naive?

The part where I've been happy with the excellent memory management for 6+ years?

Or the part where I suggest that the memory management does actually impact performance (and probably a lot more for the average every-day use person than do the CPU or GPU ceilings)?
 
Last edited:

leman

macrumors G4
Oct 14, 2008
10,370
4,874
OP is really overestimating the performance overhead of memory management. For example, compressing unused pages is essentially free. All you achieve by hoarding RAM is essentially decreasing your battery runtime and throwing more cache at your OS. Cache is always good of course, but there are diminishing returns. If the app switch animation takes longer than loading few hundred pages off the SSD, who cares where the cold pages lie exactly.
 

FlyingDutch

macrumors 6502a
Aug 21, 2019
854
712
Eindhoven (NL)
My point is that folks may be surprised at the performance mitigation that's happening LONG before they hit the yellow memory pressure.

And I agree with your previous post, it's still fully usable! They've done real magic with memory management. That's why I've gotten away with 16gb for 6+ years.

But if you're looking at cost/benefit of the upgrades on a new mac, it's important to realize that the memory management magic MacOS is doing is going to impact your performance a heck of a lot more than say, the $200 upgrade from the 2.3->2.4 i9.

Lots of tech-savvy people (like the two above us) think they're not even hitting that soft-ceiling where performance has begun to be impacted.




What exactly is naive?

The part where I've been happy with the excellent memory management for 6+ years?

Or the part where I suggest that the memory management does actually impact performance (and probably a lot more for the average every-day use person than do the CPU or GPU ceilings)?
Pal, I'm "tech savvy" enough to understand that for your suggested usage, 16 Gb are more than enough.
Even 32 Gb would be overkill. Not to speak about insanely priced 64 Gb.

Said that, your money, your RAM. 🤷🏻‍♂️
 

mightyjabba

macrumors 68000
Sep 25, 2014
1,554
255
Tatooine
64GB of RAM is just insane overkill for the vast majority of people. Even 32GB is questionable.

Somehow I've been able to muddle through on 16GB even doing things like video editing in FCP, 3D modeling, photo editing, and so forth. I'll admit that I am not up to speed with the intricacies of OS X memory management, but isn't it true that the system will basically use as much memory as you can throw at it? That doesn't mean that you are seeing tangible benefits from it.
 

revmacian

macrumors 68000
Oct 20, 2018
1,659
1,353
USA
... but isn't it true that the system will basically use as much memory as you can throw at it? That doesn't mean that you are seeing tangible benefits from it.
Basically, yes. macOS is based on BSD. And, in BSD, "unused RAM is wasted RAM". The system is going to utilize as much RAM as possible whether it actually needs it or not.
 
Last edited:

MrTemple

macrumors regular
Original poster
Jun 11, 2013
185
309
Canadian Pacific North Wilderness
Pal, I'm "tech savvy" enough to understand that for your suggested usage, 16 Gb are more than enough.
Even 32 Gb would be overkill. Not to speak about insanely priced 64 Gb.

Said that, your money, your RAM. 🤷🏻‍♂️
With almost nothing running compared to my load use, I've got 22gb requested memory and swapping 6gb, and you're saying 32gb would be LESS useful than upgrading CPU/GPU?

Super savvy.

64gb is overkill now, but in 3-4 years? Not so much. (Which is why I say 32 is plenty if you're going to upgrade in a few years anyway).
 
  • Like
Reactions: dead flag blues

revmacian

macrumors 68000
Oct 20, 2018
1,659
1,353
USA
Somehow I've been muddling through with 8GB RAM on base-model machines, never had any more than that, and I do a huge amount of office work and web browsing without ever noticing anything amiss. If my memory pressure is in the red, I sure haven't ever noticed it.
 
Last edited:
  • Like
Reactions: chabig

MrTemple

macrumors regular
Original poster
Jun 11, 2013
185
309
Canadian Pacific North Wilderness
Somehow I've been muddling through with 8GB RAM on base-model machines, never had any more than that, and I do a huge amount of office work and web browsing without ever noticing anything amiss. If my memory pressure is in the red, I sure haven't ever noticed it.
The point isn't whether or not it's muddleable, the point is whether or not your performance is taking a hit by the awesome memory management mitigation techniques in MacOS.

Yours is taking a much bigger hit than the difference of what an equal price CPU bump cost when you bought it.

That's the point of this. The base specs are fine for most. But if you're spending money to upgrade performance, keep your eyes open (and fresh-after-restart benchmarks show only a part of the picture).
 
  • Like
Reactions: motulist

Stephen.R

macrumors 68000
Nov 2, 2018
1,821
1,627
Thailand
I've got 22gb requested memory and swapping 6gb
Wait so now it’s 28GB?

Your numbers keep increasing.

I should add - I was actually incorrect, if apples docs are correct. What it lists as “file cache” isn’t files in memory for active apps - it’s memory that was used by recently closed apps, kept around to make them reopen quicker, if needed.

So, even more so, not 22GB, not 28GB.
 
  • Haha
Reactions: MrTemple

revmacian

macrumors 68000
Oct 20, 2018
1,659
1,353
USA
The point isn't whether or not it's muddleable, the point is whether or not your performance is taking a hit by the awesome memory management mitigation techniques in MacOS.

Yours is taking a much bigger hit than the difference of what an equal price CPU bump cost when you bought it.

That's the point of this. The base specs are fine for most. But if you're spending money to upgrade performance, keep your eyes open (and fresh-after-restart benchmarks show only a part of the picture).
When that alleged "hit" begins to interfere with my work (which it hasn't).. then I'll worry. But, until then, I'm not going to allow your problem to become my problem.