You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mavericks and memory (Ram)

Hi


Anyone else noticed how Mavericks uses memory ?

I have a new Macbook Air 2013 with 4GB of memory and after a short wile.

The system have used 3.99GB of the total 4GB 😟 Isn't that a big problem. Thats can't be right.

I would think that the computer would suffer greatly after a short time of use and the computer

needs to be restarted. If thats true. The new Mavericks ***** big time on Computers with less

memory. Or is there something i don't know.


Thanks

Posted on Oct 23, 2013 8:07 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 23, 2013 8:11 AM

Mavericks uses memory smarter than previous OS's, not necessarily less memory. Look at the swap memory if that is high then you have a problem. Also, if the mac is still running fast then there isn't a problem.

460 replies

Feb 12, 2014 8:07 PM in response to Grant Lenahan

For whatever its worth ... I have three machines running Maverick. One has 16 gigs, one has 4 and one has 3 gigs. None seem to suffer from any memory problems. The 16 gig machine I'm on right now has bound 8.41 gigs and I am running chat, mail, the browser and sublime text. Nothing else.

The 4 gig often gobbles up what it can get but somehow it seems that OSX is super good with managing memory and I think (though I don't know for sure) that it is normal for Maverick to grab lots and lots of memory and then give apps what they need on demand. No speed problems ... knock on wood.


Sure, having more is always nice, but it seems like 4 gigs with normal apps is no serious deficit.

Feb 16, 2014 3:27 AM in response to sjøgren

i can´t understand the memory managment either...


i own a Mac Pro 5,1 with 24 Gigs of RAM (tripleKit 8 GB)... when i use for example Corel Aftershot (Raw Converter) and i open an folder which contains approx. 500 images...


i can make an video how Maverick fills up the inactiv RAM... until its full and it starts to swap!


Same on Aperture or when i just copy a large amount of files... for example making a backup from my pictures... so why does every fileaction go into the inactiv memory until it kills the OS?


Last time i was editing in photoshop... i didn´t realise that the system is killing itself... until i completly got stocked... I just saw that the memory was full (inactiv and it was swapping!) I opened the terminal and typed in "purge", which deletes the inactiv part of the RAM... the system was like new! This can´t be an innovation or a intellegent memory managment!


So how can i stop this behaivior??


greetings from Germany


E. Hoenel

Feb 16, 2014 3:51 AM in response to mintracer

mintracer wrote:


So how can i stop this behaivior??

You can disable compression by changing the vm_compressor_mode argument to 1 (VM_PAGER_DEFAULT). That is:

sudo nvram boot-args="vm_compressor=1"

and see how much worse it is without this new Memory Management.


A good explanation of why this new technique is such a good idea read this ArsTechnica article.


Free RAM is wasted RAM. It is much more efficient for the Inactive RAM to stay there if and when it's needed than to have to go back to the HDD to get it. The management system knows how to free up RAM all by itself without you having to continually purge it. Stop watching RAM consumption and just keep your eye on the amount of Compression going on. If it stays green then no worries. If you start seeing orange, then keep watching. If it turns red, then it's time to think about adding RAM.


And what do you mean by "Kills the OS"? Most Mavericks users seem to be enjoying the experience.

Feb 16, 2014 4:09 AM in response to mintracer

You can follow the advice given to everyone else in this situation, here is yet another recap…


If you 'upgraded' or installed via Migration Assistant/ Time Machine check ALL apps & third party extensions are up to date & 10.9 compatible.


If possible try running your Mac from a clean install (on an external or spare internal partition etc). Add the apps you most need one by one & see if you can reveal the same behaviour.


Follow the regular troubleshooting (verify disks, repair permissions, safe boot, PRAM reset, NVRAM reset, run Apple hardware test/ memtester).


You can also use EtreCheck to show what is installed on your system, but since this is 22 pages of differing symptoms & 'fixes' you will be wise to create your own thread. A clean install may be simpler than cleaning up if you have years of migrated apps installed.

http://www.etresoft.com/etrecheck


Your symptoms sound abnormal, so I would consider looking at what software is running ar the kernel/ system level. If it's clean, look at what is using the RAM in Activity Monitor and double check that it is actually swapping & not just 'compressing' (red vs orange in 'memory pressure graph).


Others have reported speedups after clearing out old junk, but it may not be the reason for your issue, so try to make sure the hardware is sound first.

Feb 17, 2014 1:19 PM in response to MiguelDaCorrola

About memory management in OSX 10.9 Mavericks


Memory is managed differently, and more efficiently in 10.9. It is (mostly) unique in the industry, but may become trend.


Let’s start with the basics. Mechanical disk drives are very slow, with access speeds in the 10s of milliseconds and transfer rates in the 200-400 Mbps range real world. SSDs are much faster, on the order of a couple of ms access and typically 1200-3000 mbps transfer rates. RAM is much faster than either, in the nanosecond access and transfer speeds of ~8 Gbps effective (1 GHz x 8 bits/byte).


These are rough numbers for comparison purposes only.


So the goal is to keep as much in RAM as possible. But if you run out of RAM what do you do?

Traditionally you take the least used RAM and write it to a special part of the disk, in a way that you can access it most efficiently - minimizing the disk delays. This is called a swap file because you swap RAM in and out of it.


10.9 has a new trick: it compresses RAM using the main processors. Rather than swapping stuff to disk (disks are slow), it actually uses the processor to compress memory and make, for example, 1 GB of physical RAM hold as much as 1.5GB. Similar approaches are used to make MP3 files 10x smaller than the real thing - there is redundancy in data and you can take advantage of that. Apple is making the following calculation: the processors can compress way faster than the disk can swap. And its also predicting that the processors are often partly idle - waiting for swap files or disk access. So rather than swap files around, its compresses the files ***in RAM***.


Compression works,. Tests show that on average it is faster, and that 4GB (i have 4 GB RAM) acts like 5 1/2 - 6GB. Wow.


So, 10.9 will load up most of your RAM, knowing that it can compress some when it needs to. So don’t worry too much that it may look like all your RAM is taken - yea, it is, but its OK.


The measures to look at are:


1. amount compressed. Compression means it has run out of RAM and needs more. As long as compression is low this is fine. In fact this is how 10.9 uses RAM more efficiently than 10.6,7 or 8. Contrary to common wisdom, it requires LESS RAM than 10.8. The colored indicator tells you who this is going - green (good), yellow( iffy) and red (bad).


2. amount swapped. Once it cannot compress any further, or can’t do so efficiently, jot begins old-fashioned swapping. This is a major slow-down and means you would benefit from more RAM. Tiny amounts are OK.

here's an article by Apple - but on th pre-10.9 memory management techniques....mostly still true, but read on.


http://support.apple.com/kb/HT1342?viewlocale=en_US


Bottom line - compression makes 10.9 use RAM more efficiently than previous OSX versions. It also makes the “ram used” indicator less meaningful, and mans you should monitor “compression” .


That said, RAM has always been one of the most cost effective upgrades possible. People spend too much on new machines and too little on more RAM.


Hope this helps,


Grant

Feb 17, 2014 1:38 PM in response to MiguelDaCorrola

Yes that looks perfectly normal.


Memory pressure:

Green = fine

Orange = compression (squashing RAM to give you more temporary storage - it's quicker than 'swapping RAM to disk').

Red = Swapping to disk (not enough free RAM, so the OS stores it on disk). You have 256KB of swap in the image.


256KB of swap is TINY, it would take fractions of a second to read or write, worry when you have GB's of 'swap used'.



Your 'slowness in Adobe apps' could simply be because you have older versions (you have given very little to go on), or it could be that they do swap RAM to disk - you need to look when the apps are running slow.


Adobe's apps have a tendancy to use a lot of system resources so only run what you need. 4GB is not very much RAM, so consider upgrading it if you see some swap in your Activity Monitor memory pressure graph.



Don't take my word for it, read people who can explain better than me…

http://arstechnica.com/apple/2013/10/os-x-10-9/17/#compressed-memory - The second image has compression followed by 'swapping to disk'

Feb 17, 2014 3:00 PM in response to Grant Lenahan

I agree that the theory behind memory compression sounds good. The problem seems to be that in practice - at least on older laptops - memory compression & decompression slows down the system quite a bit.

On my Mid-2009 Macbook pro 13", when it had 4GB, I would start seeing spinning pizzas once a few bits of software were loaded, and this was consistent with the 'compressed memory' in activity monitor going above a few 100MB. (look on the memory tab, bottom right hand side)

I then upgraded my machine to 8GB, and it was much faster - unless I managed to get more than a few 100 MB as compressed memory.....

I've seen reports that 10.9.2 solves this problem (maybe not enough of the processor is being used for compression? maybe there's a bug somewhere?). I've also seen other reports saying that switching memorty compression off in terminal speeded up their machines.

Feb 17, 2014 4:00 PM in response to Michael Warhurst

Michael Warhurst wrote:


I've seen reports that 10.9.2 solves this problem (maybe not enough of the processor is being used for compression?

I'd be interested in reading that if you can point me in the right direction. I have not heard anything along those lines.

I've also seen other reports saying that switching memorty compression off in terminal speeded up their machines.

My experience was exactly the opposite, but my setup probably isn't anything like there's. Again, I'd be interested in reading about that, as I don't recall seeing anything along those lines in this way too long discussion.

Mavericks and memory (Ram)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.