macOS Catalina RAM usage - 2GB at boot?
I am trying to understand why my almost factory settings 13-inch MacBook Air 2017 with 8GB RAM available takes 2.3GB to just boot. The result is that if I start having Chrome+Dropbox+something to write any document, the machine starts swapping up to 2GB of stuff, and I really hate it, because the hard drive is indeed SSD.
- How do I manage Agents and Daemons on a MacBook? I am used to just open a whatever program that has the full list of services and tick them to enable or disable.
- How come does macOS waste so much RAM?
I come from Debian, so basically this sort of wall I perceive between me and the core settings of my machine is horribly frustrating. Thank you.
EDIT: first of all, I updated from Mojave to Catalina, to see if things improved. Following suggestions in the comments, I decided to add some screenshots of the activity monitor in different conditions:
the four screenshots represent:
- the activity monitor right after a very plain boot (basically just the OS in I think almost factory condition)
- after Dropbox app started
- after I also opened Chrome with four tabs, and
- Preview with two pdf's.
The pictures speak by themselves. I even tried to sum up the memory usage of Chrome and its child processes, and never goes beyond some 700MB. Most likely it also allocates something in the kernel space, and the wired memory takes 200MB more.
At now, it still did not start swapping, but I figured out that for some reason it places lots of stuff in the cache, and dropbox and chrome waste an incredible amount of memory for absolutely no reason (Dropbox is literally empty right now).
Contrary to what you might think - macOS is actually not wasting RAM in this case.
As I see in your comments, you seem to be using an equation like this:
used ram = app memory + wired + cached
and you're using the term "used ram" as if it means "spent ram" or something like that.
That's actually not the case.
If you want to look at "spent ram" (i.e. RAM used for something that cannot currently be used for something else) you should not include the cached RAM in the equation!
What you really want to have happen is for as much RAM as possible to be used as cache RAM. It will potentially speed up future data requests as they could potentially be fulfilled from cached instead of from the much slower disk - all while not taking up any valuable resource at all, because as soon as that RAM is needed for something else, the operating system will just use it for that something else.
The other part of your question is wanting to manage launch agents and daemons in order to be able to enable/disable them according to your needs from a big list. You can do this with the tool LaunchControl available from here:
https://www.soma-zone.com/LaunchControl/
Memory is meant to be used fully then, only later once you have a “problem” does the OS optimize and compress based on pressure. Everything looks excellent, as designed and well in order in your examples. Even if you have some memory swapped, that’s no performance issue in practice. Only after excessive swapping and sustained memory pressure would any any slowdown be measurable or need for remediation on macOS that have the pressure graph prominently featured in Activity Monitor.
The only problem (if you can call it that) is taking older articles at face value and assuming this is not correct behavior. That problem is actually an opportunity to learn how the system is designed and what signals to pay attention to now when you are tuning for performance.
Here are some excellent places to get started on why Apple’s unix operating systems are not like others. Consider how many active hours of running OS Apple has with watchOS, tvOS, iOS, iPadOS, and macOS all running the same kernel, same scheduler, and most 24x7 and need no active tuning or management under very strict RAM budgets.
-
Can I force my Mac to make better use of the inactive memory? (and I disagree with much of this -
purge
is bad unless you want to test and hobble all optimizations and see how slow running without cached files are until they cache in again or you reboot / tune the apps you run) - Isn't Inactive memory a waste of resources?
- What is memory pressure, and how do I relieve it?