2

I've just upgraded my MacBook Pro from 4GB to 8GB. Before the upgrade, I looked in the Activity Monitor and it said that it was using almost 3.98GB of 4GB (I'm a web developer, so I usually have lots of apps open.) Then after the upgrade Activity Monitor shows that it is using about 7.50GB of 8GB (with the same apps opened.) The upgrade improved the performance of the Mac, it is surprisingly faster than before, but I was hoping to see more memory available after this upgrade.

Thanks for your help!

1

There are potentially a few things happening here.

When a computer runs out of available RAM it starts swapping or paging data out of RAM to files on your hard disk. When your Mac was previously saying that it was using 3.98GB of 4GB it could also potentially have had a lot more data loaded but part of it swapped out to your hard drive. You can find these swapfiles on your Mac in /var/vm called swapfile0 and swapfile1, etc. Similar to Windows where you'll find a file called pagefile.sys, typically in the root of the C drive. If your Mac is actively storing data in swapfiles you'll see the amount that is being used listed in Activity Monitor as "Swap Used".

Compressed memory is a newer concept where the operating system tries to get the most out of physical memory by compressing the least-recently-used contents of RAM before resorting to paging out, but it can only go so far. Once it can't compress anything else it'll start paging out to swapfiles.

Another thing that could be happening that might explain why your upgraded machine is sitting at 7.5GB of 8GB used, is that once you close applications and files the operating system doesn't immediately release that space in RAM. It'll store that data in a file cache, until it needs to use that space for something else, so that if you decide to open the same files again it can open them almost instantly. You can see this in action where you start up your Mac and it takes maybe five-ten seconds to launch an application the first time, but if you close it and open it a second time it opens much much faster, because that data was never released from RAM. You can also see the size of the "File Cache" value listed in Activity Monitor. So it could be that 5GB of your RAM is the stuff you are actually using right now, and 2.5GB is stuff that you were using recently and your Mac is keeping handy just in case.

There is more going on with memory management than just these things, but these are the ones that I think most likely explain what you're seeing. Chances are before the upgrade you Macbook was using more than 4GB because some data was paged out to swapfiles, and now your Macbook could be actually using less than 8GB but using up the free space with a file cache that allows it to quickly reopen things you recently closed.

2

The old days keeping as much RAM free as possible are gone.

The new RAM management from OS X, use all available memory, but also manages it so that you get maximum performances.

If you look in the Activity Monitor- memory, you will see things like Memory Pressure, Compressed among other information.

1

You'd probably had a lot of compressed memory in your 4GB days. Now, with 8GB, you're not nearing your limit yet so your computer doesn't see a need to compress anything. If you ever hit 7.99GB, you'll start building up compressed memory again. (I recently went from 4GB to 10GB, and I'm currently using 9.97GB but only have 7.1MB of compressed memory.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .