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.

Lion - Memory Usage Problems

Why is Lion using all 4GB of RAM running Mail, Safari (2 tabs), and iTunes? Snow Leopard was bad enough at handling memory, eating up every available byte and Lion seems to be arbitrarily using even more RAM. Windows 7 has zero problems handling RAM, there's no reason OS X shouldn't be able handle memory properly.


Can someone explain what Apple is doing here? I'm at a total loss. For users who just need Safari, Mail, and iTunes... I guess this works. But how am I expected to reliably run Logic, Final Cut, or Aperture with OS X using every available resource for Web Surfing, E-mail, and Music. This is totally unacceptable for a multi-million dollar software company greated towards professionals as well as consumers.


The following responses are not acceptable by the way:


  • Buy more RAM - I did that already, it will eat up 2/4/8GB, doesn't matter. Not to mention Apple still sells numerous 2/4GB confirgurations.
  • Buy a newer/more powerful Mac - this is a improper handling of memory issue, not a hardware issue.


I'd really love some insight into this. Thanks for reading.

MacBook Pro, Mac OS X (10.7), 13" (late-2009)

Posted on Jul 21, 2011 5:45 AM

Reply
957 replies

Feb 8, 2012 1:14 PM in response to Barry Fisher

Hi Barry,


Yes or Yes, I think so. When I was consistently using Safari and once since I retired Firefox when using a graphics program for film my machine would rapidly consume RAM and then present an error that I needed to shut down applications because all the memory was gone. It would show Active Memory being used up quickly (like going from 1.5 - 3.2 in seconds) and then the visual (pie chart) would show Inactive Memory rushing to consume the remaining space, then the error message would tell me I had no more memory. Additionally I wouldn't be able to do anything with my applications.


This might be what Black Nova is saying (though he/she is saying it a bit more technically.)


Also, I noticed a difference in my expereince with SeanChristmann when I looked at his image. Once I shut the applications down, after a big RAM consumption, both my graphical representation (pie) and the numerical representation to the right show higher RAM consumption in Inactive Memory than what appears to be in the list of applicatons that Inactive Memory is using (which I get my looking at Inactive Memory in the Activity Monitor and estimating the total MB consumption by tallying the individual items in my head.)


Apple Boston helped me understand that Lion wants to use 1.5 GB just to run itself. That helped me understand the benchmark bottomline when I was having problems. Also, they helped me see that getting around kernel_tasks 400-700MB consumption isn't really necessary. Just consider it used RAM. They were worried about the amount of Inactive Memory being used and how fast it was consumed while I was running basic applications - at 2GB of Inactive Memory the Geniuses (feels like a more humble name might be "techs") were concerned.


I am running ok generally but I've lost a lot of trust in this pretty but expensive machine.

Feb 8, 2012 2:42 PM in response to Mac_Boston

Mac_Boston wrote:


Hi RC-R,

I got it by looking at Inactive Memory in the Activity Monitor (use the drop down) ...

If you set the update frequency (in the Activity Monitor View menu) to its most frequent setting, you should see the number of inactive processes shown change very rapidly. If you set it to much less frequent intervals, you should see very different results -- many processes won't show up at all. You will probably also notice that the totals for active & inactive memory shown at the bottom of the window don't change much if at all.


This is a good indication of why you can't tell much about the system's moment-to-moment active/inactive memory use using your method: if you set the update frequency short enough to see more of the changes, not only will you not necessarily see all of them, you won't have enough time to add up their real, shared, etc. memory use ... which is not a direct indicator of their active memory use to begin with.


I'm not sure what the Apple "geniuses" coached you to do, but I suspect they were not telling you to try to judge total active memory use this way ... at least if they were as smart as the name suggests. 😉

Feb 8, 2012 3:06 PM in response to R C-R

Huh. That is very interesting. It was at 2 seconds. I just set it to .5 sec (which is pretty hard to watch with all that movement.) I'll keep an eye on it. Would this explain though why it might be reporting more inactive memory down below than I can see in the list even over a few minute period?


I am attaching a screen shot from when Apple and I were first working on this and it was happening a lot (again they diagnosed it as Safari or new Yahoo! mail + Safari but it still happens periodically.) This is an example where the machine asked me to close applications, I could run much at the moment, more active memory was being used than inactive (not what I was describing previously but the only screen shot I have) and the list of items in inactive memory at this moment (and the moments around it) don't appear to add up to 2.2 GB.


(They were indeed tell me to take screenshots of moments of memory usage to try to help them diagnose the memory consumption problem when it was first happening.

Thanks RC-R

Feb 8, 2012 4:03 PM in response to Mac_Boston

would rapidly consume RAM and then present an error that I needed to shut down applications because all the memory was gone.

Yeah, that is definately a problem and different than what I've encountered. Normally, if I have a bunch of stuff open and then close things down, I'll get a situation like 1.2 fee memory and 6 more or less GB of "inactive". If I than open a photo processing photo and export like 3-500 files that are going to be 30 or more MB apiece, It will rapidly use up the remaining free ram into active ram. If the inactive was not relesing, i would then get those types of messages or beachballs or crashes etc. but instead, at that point before I am getting any page outs, the inactive ram starts releasing to free ram and it cycles. That's how it's supposed to work according to my understanding. If you are getting these messages, then that's a problem and they need to fix it.

Feb 8, 2012 7:48 PM in response to mightymilk

My old 2005 iMac (2.0 GHz single-core G5 processor, 1.5 GB of RAM, less than 1 GB free disk space, Leopard OS) died last fall.


I replaced it with a new 2011 iMac (2.7 GHz quad-core i5 processor, 4 GB of RAM, 750 GB free disk space, Lion OS).


Naturally, I expected some performance boost, but the only thing this new iMac does with any proficiency is spin the beachball. In many respects, it seems slower than the old machine.


As I write this, I have only about 33 MB of RAM free and nearly 17 GB of swap used. (I've seen swap much higher, over 50 GB.) The primary offenders are Safari Web Content, Safari, and Flash (Safari plug in) consuming about 1.5 GB. I am not running any high-resource applicaitons (no audio/video editing, for example).


I don't know whether Safari has a memory leak, or Lion simply can't manage memory. I do know that I need to reboot this iMac frequently just to keep it running.


I miss the old Apples. The ones that worked.

Feb 8, 2012 8:05 PM in response to Mac_Boston

Mac_Boston wrote:


Would this explain though why it might be reporting more inactive memory down below than I can see in the list even over a few minute period?

Where do you see inactive memory being reported besides at the bottom of the window? When you filter the running process list to show only inactive processes, you still see (for instance) the real memory each of those processes is using. Don't expect that to add up (even approximately) to the total amount of inactive memory because (among other things) active processes may also be contributing to that. IOW, even an active process may not actively be using all of the real memory assigned to it.


The only place Activity Monitor shows you the amount of inactive memory is at the bottom, where it is labeled as such.

Feb 9, 2012 6:50 AM in response to Mac_Boston

Mac_Boston wrote:


Hi Barry,


Yes or Yes, I think so. When I was consistently using Safari and once since I retired Firefox when using a graphics program for film my machine would rapidly consume RAM and then present an error that I needed to shut down applications because all the memory was gone. It would show Active Memory being used up quickly (like going from 1.5 - 3.2 in seconds) and then the visual (pie chart) would show Inactive Memory rushing to consume the remaining space, then the error message would tell me I had no more memory. Additionally I wouldn't be able to do anything with my applications.


This might be what Black Nova is saying (though he/she is saying it a bit more technically.)


Also, I noticed a difference in my expereince with SeanChristmann when I looked at his image. Once I shut the applications down, after a big RAM consumption, both my graphical representation (pie) and the numerical representation to the right show higher RAM consumption in Inactive Memory than what appears to be in the list of applicatons that Inactive Memory is using (which I get my looking at Inactive Memory in the Activity Monitor and estimating the total MB consumption by tallying the individual items in my head.)


Apple Boston helped me understand that Lion wants to use 1.5 GB just to run itself. That helped me understand the benchmark bottomline when I was having problems. Also, they helped me see that getting around kernel_tasks 400-700MB consumption isn't really necessary. Just consider it used RAM. They were worried about the amount of Inactive Memory being used and how fast it was consumed while I was running basic applications - at 2GB of Inactive Memory the Geniuses (feels like a more humble name might be "techs") were concerned.


I am running ok generally but I've lost a lot of trust in this pretty but expensive machine.

It is all about processes and how they use the RAM, Random Access Memory.


People are getting this idea that inactive memory is bad and normal processes are consuming all their RAM.


First, RAM is where your programs go to work. So, your system uses 1.5 of physical RAM. Is that bad? NO!

The operating has processes that work in the background that keeps what your see on the monitor going. When you stat to use other applications, programs, they are going to need some of that RAM. However, here is where you need to stop and think about what you are worrying about. If you use all your physical RAM then what is going to happen to your computer? It will freeze up and not work.


In a 64bit OS as Lion they have this really cool idea, Virtual Address Space. There is 16TB of it. In Windows it is 8TB. BTW, that Terabytes. What is this Virtual Address Space? Well that is how they can get programs to work on your system. It is a mixture of some physical RAM and your Hard Drive. The system knows how to swap it around faster than me typing this reply. It is also know as Paging Files for those Windows users. Is Lion is is Swap files. This is how a 64bit OS works the way it does. You should be able to opne multi windows and running x amout of programs with ease. However, what can limit you is the hardware. The processor may not be designed for it. Know your hardware and it's limits.


I have a custom built PC with Windows on it. It has 16 GB of RAM. When it is sitting there is is only using roughly 899 MB of actual phyiscal RAM. When running Explorer, Outlook, and some other it may run up to 2 GB. Never the total of 16 GB. Why? because the system does not need it. It becomes a mixture of Standby and Inactive. The OS knows it is there but does not need yet. So, the notion that your system using 1.5 GB is ok. That is the processes that keep the system going and when you run programs.


What I am seeing in your statements and others is that you are trying to out think your operating system and how it manages memory.


Do not confuse RAM, which is not storage, with your hard drive, which is. I think people do mix them up too.


Inactive memory

This information in memory is not actively being used, but was recently used.

For example, if you've been using Mail and then quit it, the RAM that Mail was using is marked as Inactive memory. This Inactive memory is available for use by another application, just like Free memory. However, if you open Mail before its Inactive memory is used by a different application, Mail will open quicker because its Inactive memory is converted to Active memory, instead of loading Mail from the slower hard disk.

Inactive is just that, inactive. It is not being used. So someone is not telling you how to look and read that information correctly. It is not being consumed by anything rather it is freed up for something else to use.


Suggest reading this: http://support.apple.com/kb/HT1342

Feb 9, 2012 6:53 AM in response to javatoid

javatoid wrote:


My old 2005 iMac (2.0 GHz single-core G5 processor, 1.5 GB of RAM, less than 1 GB free disk space, Leopard OS) died last fall.


I replaced it with a new 2011 iMac (2.7 GHz quad-core i5 processor, 4 GB of RAM, 750 GB free disk space, Lion OS).


Naturally, I expected some performance boost, but the only thing this new iMac does with any proficiency is spin the beachball. In many respects, it seems slower than the old machine.


As I write this, I have only about 33 MB of RAM free and nearly 17 GB of swap used. (I've seen swap much higher, over 50 GB.) The primary offenders are Safari Web Content, Safari, and Flash (Safari plug in) consuming about 1.5 GB. I am not running any high-resource applicaitons (no audio/video editing, for example).


I don't know whether Safari has a memory leak, or Lion simply can't manage memory. I do know that I need to reboot this iMac frequently just to keep it running.


I miss the old Apples. The ones that worked.

How many programs do you have open?


Also, I can not believe that you only have 33 MB? of RAM free out of 4GB. You are misreading the information.

Feb 9, 2012 7:25 AM in response to IvanOhio

Hi IvanOhio,


your explanation is very good and clear. I've had exactely the same issue as described by MacBoston or Javatoid and like to share my experience.

On my MBP mid 2010, I've got down to 10MB free Ram available out of 8GB and was not misreading the figure. I came so often that my mac wasn't really useable, even if I was only playing with a webbrowser and a mail tool. It was suddenly so slow that the only solution was to either free the memory (through a nice tool called FreeMemory) or shut down the mac regularly like a cheap PC with XP.

I would have never cared about the available RAM and how it is managed if the OS was working correctly, but it did not and obliged me to learn more about what could be wrong or not. Nothing could help me much though.


If you've read it correctly, you might have read that I'm writing in the past form. Yes the problem is somehow solved now, as I've updated my sytem to 10.7.3 and Firefox 10.0. And it works much much better. I'm not looking on the available RAM figures with fears anymore :-).

Hopefully it will continue to work that way a longer period.

Feb 9, 2012 9:55 AM in response to pana_zyde

FYI, that FreeMemory thingy is bogus. It is the same as the infamous memory optimizers for the early Windows OS's. Your OS will and some program, normal everyday use, will use about a 1 to 2 GB. The rest of your physical RAM is free. So how does this make your computer run better?


Also, One thing to note about the Virtual Address Space is that if OS X has 16 TB of VAS is giving your system 8 TB and the processes, programs, the other 8 TB. So, your programs should not be hanging up any.



Curious, You say it shows only 10 MB out of 8 GB.


What are you running? Can you take a snapshot of this happening?


I think you are misreading something.

Feb 9, 2012 10:12 AM in response to IvanOhio

Well, you are right, at least if OS memory management is working as it should there should be no need to use third party and even first party (I mean 'purge', even if it is available only in SDK) tools to free memory. In my 20 years of computer usage experience I've never before used such a tool (even in DOS and Windows 3.1). Yet, starting with OSX 10.6, I got to run 'purge' several times a day just to keep system responsive.

Feb 9, 2012 11:03 AM in response to BlackNova

You are right. Problem is simple:


Memory manager don't do what it have to do: no release memory from inactive memory block when the free memory block is exhausted. Then unwanted swap function start to work.


Why the great debate and theorizing. If the memory manager will perform his duties, this issue would not exist.

Lion - Memory Usage Problems

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