Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ghanwani

macrumors 601
Original poster
Dec 8, 2008
4,903
6,266
I looked at the activity monitor and it shows 10+G of RAM being used. This is with chrome and several open tabs, and some office apps (word, ppt), running. Nothing else. How do people run with 8 GB? Sounds like there would be a lot of pressure in such systems.

Also, what is "wired memory" and "compressed"?

Thanks.
 

Attachments

  • Screen Shot 2019-07-01 at 8.58.37 PM.png
    Screen Shot 2019-07-01 at 8.58.37 PM.png
    101.5 KB · Views: 195
People run with 8GB just fine. You can’t infer what the memory stars would be with an 8GB config from your data. Wired is memory used by system processes that it prohibited from being swapped out. Compressed memory is data in memory that has been unused for some time so the system has decided to compress it to free some resources. In the event this data is needed again, it can be decompressed very quickly.

FreeBSD/macOS memory management is complicated. You can find a more detailed overview here: https://unix.stackexchange.com/ques...the-different-memory-counters-in-freebsd-mean
 
Unused memory is wasted memory. macOS knows this and does a lot of caching and also doesn't just free up memory if it's not requested by another program or is pretty unlikely to be needed again.

macOS also does memory compression, which you asked about. Let's say an app, app A, uses 4GB of RAM. Your system has a maximum of 6 to deliver in this example. Now another app, app B, requests 4GB too. This exceeds your machine's capacity by 2GB. macOS now has two options. Option 1) Page memory to the SSD/HDD. This is what the swap file is. Option 2) Compress some of the 4GB of memory used by app A. This means it'll use a clever algorithm to take the memory, and keep it in fast system memory, but reduce the space it takes up. To access this memory you don't need to move a lot of data around to access it like with a swap, but a few CPU cycles will have to be spent uncompressing it. Generally a faster process, but macOS intelligently picks between the two options depending on access patterns and such. On iOS there currently is no swap option so it only has two options. Compress or evict, where eviction will kill the app that loaded something into memory.

Wired memory is essentially just memory that cannot be evicted no matter the circumstance. Memory that may never be swapped, is unlikely to get compressed (if even possible) and just may not be dealt with by the system like other memory. This includes kernel critical tasks, like hardware management, essential libraries, and page tables; I.e. information about where to find everything else.
Sometimes closing stuff can slightly free up wired memory too since it may shut down some otherwise kernel linked resources like open networking sockets, but generally speaking wired memory cannot easily be controlled like app memory. 3GB is on the high end, likely pointing to apps having a lot of kernel-critical resources being active.

The more memory you give a Mac, the more memory it'll use. It's not always because it needs to. That's why the pressure graph became more important than the reported free memory.
Hell, free memory isn't even reported. It's just memory used - physical memory, but it's an unimportant number without full context, since macOS can easily make more free memory when it needs to unless the pressure graph is in the red.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.