Comment by post-it
9 hours ago
> macOS 15 uses ~5GB on startup without any app open
Sort of? Mac very aggressively caches things into RAM. It should be using all of your RAM on startup. That's why they've changed the Activity Monitor to say "memory pressure" instead of something like "memory usage."
I'm typing this on an 8 GB MacBook Air and it works just fine. I've got ChatGPT, VSCode, XCode, Blender, and PrusaSlicer minimized and I'm not feeling any lag. If I open any of them it'll take half a second or so as they're loaded from swap, but when they're not in the foreground they're not using up any memory.
Indeed, as I used to tell my ops colleagues when they pointed to RAM utilization graphs, "we paid for all of that RAM, why aren't we using it?"
Because OoM errors are oh so fun.
Caches are automatically released by the OS when demand for memory increases.
2 replies →
do you also say that about hdd space? about money in the bank?
Why he wouldn't say it about HDD space? You buy HDD to keep them empty?
And as for the money analogy, what's the idea there, that memory grows interest? Or that it's better to put your money in the bank and leave it there, as opposed to buy assets or stocks, and of course, pay for food, rent, and stuff you enjoy?
1 reply →
It’s counterintuitive but I learned this best by playing RTS games. If you don’t spend money your opponent can outdo you on the map by simply spending their money. But the principle extends, everything you have doing nothing (buildings units etc) is losing. The most efficient process is to have all your resources working for you at all times.
2 replies →
> about money in the bank?
Yes, generally. That's the entire idea behind the stock market.
because memory access performance is not O(1) but depends on the size of what's in memory (https://www.ilikebigbits.com/2014_04_21_myth_of_ram_1.html). Every byte used makes the whole thing slower.
I am not following, isn't this just a graph that shows that how fast operations happen is largely dependent on the odds that it is in cache at various levels (CPU/Ram/Disk)?
The memory operation itself is O(1), around 100 ns, where at a certain point we are doing full ram fetches each time because the odds of it being in CPU cache are low?
Typically O notation is an upper bound, and it holds well there.
That said, due to cache hits, the lower bound is much lower than that.
You see similar performance degradation if you iterate in a double sided array the in the wrong index first.
1 reply →
Memory access performance depends on the _maximum size of memory you need to address_. You can clearly see it in the graph of that article where L1, L2, L3 and RAM are no longer enough to fit the linked list. However while the working set fits in them the performance scales much better. So as long as you give priority to the working set, you can fill the rest of the biggest memory with whatever you want without affecting performance.
> Every byte used makes the whole thing slower.
This is an incorrect conclusion to make from the link you posted in the context of this discussion. That post is a very long-winded way of saying that the average speed of addressing N elements depends on N and the size of the caches, which isn't news to anyone. Key word: addressing.
RAM is always storing something, it’s just sometimes zeros or garbage. Nothing in how DRAM timings work is sensitive to what bits are encoded in each cell.
Huh? There is nothing called "empty memory". There is always something being stored in the memory, the important thing is whether you care about that specific bits or not.
And no, the articles you linked is about caching, not RAM access. Hardware-wise, it doesn't matter what you have in the cells, access latency is the same. There is gonna be some degradation with #read/write cycles, but that is besides the point.
why is it not O(1)? It has to service within a deadline time, so it is still constant.
The author of that post effectively re-defines "memory"/"RAM" as "data", and uses that to say "accessing data in the limit scales to N x sqrt(N) as N increases". Which, like, yeah? Duh, I can't fit 200PB of data into the physical RAM of my computer and the more data I have to access the slower it'll be to access any part of it without working harder at other abstraction layers to bring the time taken down. That's true. It's also unrelated to what people are talking about when they say "memory access is O(1)". When people say "memory access is O(1)" they are talking about cases where their data fits in memory (RAM).
Their experimental results would in fact be a flat line IF they could disable all the CPU caches, even though performance would be slow.
In macOS 15 there are two metrics: "Memory used" and "Cached Files"
I'm specifically talking about "Memory used" here.
In fact, on my 16GB mac, if I open apps that use ~8GB of RAM (on top of the 5GB I mentioned earlier), it starts swapping.
When you open up Activity Monitor, to the immediate left of the "Memory Used" and "Cached Files" that you see, you'll see the Memory Pressure graph that the guy above is talking about.
On my 64 GB M1 Macbook Pro right now, I have 53.41 GB of Memory Used and 10.72 GB of Cached Files and 6.08 GB of swap, but Memory Pressure is green and extremely low. On my 8 GB M1 Macbook Air I just bought for OpenClaw, I'm at 6.94 GB Memory Used and 1.01 GB of Cached Files with 2.05 GB of Swap Used, and Memory Pressure is medium high at yellow, probably somewhere around 60-70%.
You can open up the Terminal and run the command memory_pressure to get much more detailed data on what goes into calculating memory pressure - more than just the amount of swap used, it tracks swap I/O and a bunch of page and compressor data to get a more holistic sense of what's going on and how memory starved you're going to feel in practice.
In any case - I've been absolutely mindblown at how fast my 3 8GB M1 Macbook Airs I just bought for ~$350 brand new have been - even with tons of Chrome tabs open, multiple terminal windows open, running OpenClaw and Claude Code and VS Code and doing a ton of development and testing, never once have they ever felt slow. Oftentimes they actually feel faster than my 64 GB M1 Macbook Pro, which kind of blows my mind and makes me wonder wtf is going on on my monster machine. Moreover, my M1 Macbook Pro drains battery like crazy and uses a ton of charge, whereas the Macbook Airs stay constantly below 10 watts essentially always and even with Amphetamine keeping them on 24/7, with the display off and being fully on, they'll drop to a single watt of power draw. Truly insane stuff. I've lost all my concern about RAM, to be honest (which is shocking coming from someone who bought a top of the line maxed out RAM primary machine in 2021 specifically because I felt like RAM was so important)
> I've been absolutely mindblown at how fast my 3 8GB M1 Macbook Airs I just bought for ~$350 brand new
Wait what? How did you manage that?
3 replies →
Yes, the person you are replying to has explained that.
The old mental model of how ram and swap works doesn't fit neatly to how modern macos manages ram. 8GB is acceptable, although on the lower end for sure.
The old mental model doesn't fit how any OS manages RAM. Every OS plays all sorts of fun guessing games about caching, predicting what resources your program will actually need etc. The OS does a lot of work to ensure that everything just hums along as best as possible.
How do you define "swapping?" Even on Intel Macs, the memory statistics don't map the way one might expect. Be careful when making assumptions about what those metrics actually mean.
I mean at that point (13 GB memory used), the "Swap used" is at several hundred megabytes.
And if I more apps (or browser tabs), the "Swap used" keeps increasing, and the "memory pressure" graph switches color from green to yellow.
The color of that graph is the indicator I'm using to know that I should close my browser tabs :p
I remember when Windows Vista had to contend against the same allegations when it was released. It did have a higher memory footprint, but a lot of the ridiculous usage numbers people had published were the SuperFetch just precaching commonly used programs to give better application startup times.
Ha, wasn't it windows vista that allowed you to plug an SD card to use for swap space/fake ram?
After several days of usage, Activity Monitor will usually shows that "WindowServer" is using 6 GB of RAM.
Yeah, 8 GB RAM does not cut it anymore. At least until Apple start fixing the memory leaks in MacOS.
Unused RAM is wasted RAM. If your machine isn't reporting memory pressure and/or the user isn't experiencing pageouts, then the machine is well-suited to the user's workload.
I'd rather my ram go to my page cache, not have bloated apps hoarding it.
1 reply →
Uptime of 13 days. My WindowServer is at 441Mb. ??? (32Gb RAM M2Max MBPro)
Have you tried turning it off and on again?
> I'm typing this on an 8 GB MacBook Air and it works just fine.
Most cool. Is it an M1?
Early 2020 i3 macbook air
Not the OP, but I have an M1 MBA and it handles light "coding" stuff quite well, though haven't tried VSCode+Zoom+bunch of other stuff, as my work laptop is a M1 MBP.
Same. I've been programming in Go on an M1 for years and perf is spectacular.
M2
It also compresses memory. Many things in ram compress really well.
Memory compression is a feature on Windows PCs for years (decades maybe?), it somehow doesn't prevent people from raising valid complaints about swapping with 8Gb or RAM.
I wonder, why is it physically painful for some Apple owners to admit that 8Gb is not enough. Like, I'm using PCs for years and I will be the first in line to point their deficiencies and throw a deserved stone at MS, they never cease to provide reasons. Why is it so different at the Apple?
Because 8GB is literally enough? There are multiple 8GB Macs in this house and they are fine. I wouldn't use them for development work but they're completely competent at the basics.
Perhaps because it's enough for a lot of things. I only came up against the 8GB limit when I ran a LLM locally using Ollama. It worked but wasn't workable.
8GB isn't ideal though and 16GB would've expanded its capacity to do more things. But soon as I want to do more things I shuffle over to my PC with it's dedicated GPU and 32GB o ram
I'm guessing Apple cuts capability to the lower end so as not to hurt sales of the higher end. Usage profile is often dependent on context. There are enough non-power users (when mobile) like me that 8GB isn't ideal but it's enough. And if it wasn't enough we could've paid more for the 16GB, but I personally decided it wasn't worth the ridiculous Apple ram price premium.
So these are my reasons for saying 8GB is enough. I'm also using an M1 MacBook Air, so the puniest of the lineup. Next laptop I'm considering is possibly a think pad with linux so I'm no macOS fanboi.
> I wonder, why is it physically painful for some Apple owners
This wasn't necessary. I was just pointing out that 8GB hardware is not the full story. It's also true with windows, as you correctly point out. If you're coming from a slow SSD, or even Linux (it's a relatively new feature to have on by default) you might be pleasantly surprised.
Also, I'm an Apple owner and I have no problem saying it's not enough for anyone on this website. I tried it for a few years as my "second screen" computer, and would bump against it all the time, with glorious screeching as the audio skipped. But, I'm also a developer/power user.
The majority of people aren't power users.and that's the target audience for this. Clearly.
8GB has been completely fine for every non power user I know. Again, the majority of people do everything within a browser, maybe play some music/video at the same time, maybe open an office type app. It's completely acceptable for that, and that should not surprise you, as someone who has an understanding of memory usage and paging, and high bandwidth SSDs, in the slightest.
1 reply →
What are you slicing?
What do you find compelling with Prusa slicer over orca slicer?
I'm printing a new multi-laptop stand that can accommodate a work laptop I've just received. I've actually never used Orca, PrusaSlicer is the first one I tried and it's done everything I've needed.
There's a lot of different kinds of "using". "Memory pressure" includes some kinds of caching (ie running idle daemons when they could get killed) and not others (file caching). And there are also memory pressure warnings (telling processes to try to use less memory), so there's a lot of feedback mechanisms.
I don't suggest sitting and looking at Activity Monitor all day. I think that is a weird thing to do as a user. If you would like to do that in an office in Cupertino or San Diego instead then you can probably figure out where to apply.
i think the main point that GP was trying to make is that depending on the workload 8gb of memory might not be an issue.
the keywords here are "depending on the workload".
edit: i was thinking that it's gonna be interesting to see i/o performance on storage, that might end up determining if those 8 gigabytes are actually decent or not.