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

Jul 26, 2011 12:21 PM in response to mightymilk

I'm not saying that your case is user error, and I do understand what memory leaks are. 45 years in the computer industry, and credit me with having learned something please.


But it's clear that not everyone with memory issues is actually presenting evidence of memory leaks. There is more at play here.


And I certainly didn't say anything about "user error". I am merely offering the opportunity for learning, and if you want to reject that, then go ahead. Others may find it helpful.


PS, what do you mean by "PFing"


Message was edited by: John Kitchen - added PS

Jul 26, 2011 12:50 PM in response to John Kitchen

"PFing" means "page faulting." Basically, that is the interrupt or exception raised when an application needs to access a page of its virtual address space that is on disk, but not in memory. At that point, the page is read into memory. One or more pages may be written out then or more RAM may be allocated to what you call the application's "working set." Consider it a "Page In" which is the inverse of your "Page Out." The difference is that "Page In" events are the primary driver for all virtual memory paging--though the operating system will try to optimize things a bit by adjusting the "working set" size, reading additional pages in anticipation of need, and scheduling the writing of pages to try to reduce the impact on the application and the system as a whole.


In summary, "page faults" are what he meant.

Jul 26, 2011 12:50 PM in response to John Kitchen

John Kitchen wrote:


I'm not saying that your case is user error, and I do understand what memory leaks are. 45 years in the computer industry, and credit me with having learned something please.


But it's clear that not everyone with memory issues is actually presenting evidence of memory leaks. There is more at play here.


And I certainly didn't say anything about "user error". I am merely offering the opportunity for learning, and if you want to reject that, then go ahead. Others may find it helpful.


PS, what do you mean by "PFing"


Message was edited by: John Kitchen - added PS


I'm not trying to insult your intelligence but you seem to be disregarding the information that's right in front of you. You're basically arguing that just because everyone didn't post a Screen Shot of Activity Monitor that there's room for serious doubt.


I've been heavily involved with computers for 15 years now, and I'm no slouch when it comes to trouble shooting and technical data. Even if I wasn't well educated in computers, I'd know that 4GB of RAM lost on iTunes, Mail, and Safari (3 tabs) just doesn't sound right.


I have no doubt you have experience with computers, but my experience tells me that you're missing the mark on this one. You shouldn't take it personal, but since you're replying to my thread I felt the need to tell you that I feel like your information is totally unrelated to the issue at hand.


I appreciate your response, I just fail to see the relevance to our particular problem. That's all.

Jul 26, 2011 12:56 PM in response to mightymilk

And another thing which is very annoing and it may be caused by memory issue is that: when i am scrolling with mouse or touchpad whole computer freezes for several seconds (only mouse cursors moves). Also Flash movie watching causes freezing. That problem is on my both computers. And sometimes only open program freezes and if I open another program and move back to that first program scrolling is moved on. And then freezes again then I scroll, nothing happens and then click to another program and move back and scroll has moved again. Strange.


I am very dissapointed, the new OS X is not that I expected!


Something is needed to be done quickly by Apple it disturbing and makes my work very slow.

Jul 26, 2011 3:07 PM in response to mightymilk

mightymilk wrote:


<snip>

I'm not trying to insult your intelligence but you seem to be disregarding the information that's right in front of you. You're basically arguing that just because everyone didn't post a Screen Shot of Activity Monitor that there's room for serious doubt.



On the contrary, what I'm doing is expanding on what has been written.


For your particular memory issue, the problem is memory leaks, but others who visit this thread may have different "Lion - Memory Usage Problems" to quote the title of this discussion.


There are many other discussions dealing with memory-related issues, not just your particular problem.


I must remember that line "I'm not trying to insult your intelligence but...."

Jul 26, 2011 4:34 PM in response to mightymilk

not sure if people missed this, because i read through this entire thread, and it seems that it veered from the original subject a little bit... or at least went into too much technical information for an average user like me.


on page 2, somebody recommended upgrading adobe flash on adobe's website. i think the latest version is 10.3.


i was having the exact same problems described by everyone in here - safari and mail were eating up an inordinate portion of my ram - on a 2009 MBP 17" unibody with 4GB ram, i would constantly have 3.7 used, 0.3 free. i would use "icleanmemory" to reset the ram, and it would jump back to its previous values within seconds.


i downloaded the latest flash player from adobe, installed it, and i can happily say that the problem seems to have disappeared completely. now, with safari, mail, and itunes running (up to 8 tabs in safari), i haven't seen my ram usage go above 1.6 GB used.


also, an obvious corollary to the decrease in ram consumption is that my macbook pro now runs much cooler - between 130 and 140 degrees farenheit with normal usage, usually in the low 130's (before installing the latest flash player, i couldn't keep it below 155 degrees, and it usually got up into the 160s-170's with simple web browsing). i read a thread about increased temperature since installing lion, as well, and this flash player update seems to have solved that problem.


so there you have it - 2 birds with one stone. hopefully it will continue working for me, and i won't have to come back and edit this post. but if you haven't done this yet, please give it a try. so far, it is a complete fix.

Jul 26, 2011 4:48 PM in response to mightymilk

mightymilk wrote:

I'm not trying to insult your intelligence but you seem to be disregarding the information that's right in front of you. You're basically arguing that just because everyone didn't post a Screen Shot of Activity Monitor that there's room for serious doubt.

By itself, Activity Monitor will not tell you if an app has a memory leak or if something is using "too much" memory. In the Mac OS, any 32 bit process can have up to up to 4 GB of addressable memory space allocated to it; for 64 bit processes the max is 18 exabytes -- far more than any Mac can provide.


To make this work, the OS relies heavily on virtual memory, storing data not currently in use on the hard disk & paging into & out of physical memory only what is needed. The details of how & when it does this are not visible to the user. Nor is it a simple process: for instance, only a small part of what is in physical memory may need to be paged out; much of it can usually simply be discarded. (For the details, see this developer document, in particular the “About the Virtual Memory System” section.)


To track memory use, for instance to see if an app has a memory leak, you must use the tools & techniques mentioned in the above document. Just looking at the total free & used memory, or the memory numbers Activity Monitor shows you for each process, does not begin to provide enough info to tell anyone what's really going on.

Jul 27, 2011 12:08 AM in response to R C-R

I'm glad I am not the only one having this issue. I posted on macrumors the day it came out that this was going on and was rebuked as trying to find a reason to hate the new operating system. My laptop is the santa rosa late 2008 macbook unibody 2.4. I have 4 gb ram dd3 recognized by system profiler, but even with safari and mail closed the system is sluggish. Just trying to load apple.com in firefox with nothing else open shows me 3.96gb used on activity monitor and less than 100mb obviously free.


This is unbearable and unacceptable for a realtively new apple, not sure what's going on here but my fan stays on full blast all the time now.


Have ordered an 8gb ram pack from crucial which may or may not help, we'll see. And also am doing an install clean from DVD tomorrow afternoon.

Jul 27, 2011 3:38 AM in response to mightymilk

I have a similar issue. A website with a flash game. I opened Activity monitor and saw Safari quickly climbing to 3Gb of physical RAM usage and a spinning beach ball when opening the game.


For me I found a solution. I had just one extension running: 1password. As a test I disabled all extensions in preferences and all was well. I could not even open this page under Snow Leopard with no extensions loaded and now with Lion I can 🙂

Jul 27, 2011 5:17 AM in response to R C-R

R C-R wrote:


mightymilk wrote:

I'm not trying to insult your intelligence but you seem to be disregarding the information that's right in front of you. You're basically arguing that just because everyone didn't post a Screen Shot of Activity Monitor that there's room for serious doubt.

By itself, Activity Monitor will not tell you if an app has a memory leak or if something is using "too much" memory. In the Mac OS, any 32 bit process can have up to up to 4 GB of addressable memory space allocated to it; for 64 bit processes the max is 18 exabytes -- far more than any Mac can provide.


To make this work, the OS relies heavily on virtual memory, storing data not currently in use on the hard disk & paging into & out of physical memory only what is needed. The details of how & when it does this are not visible to the user. Nor is it a simple process: for instance, only a small part of what is in physical memory may need to be paged out; much of it can usually simply be discarded. (For the details, see this developer document, in particular the “About the Virtual Memory System” section.)


To track memory use, for instance to see if an app has a memory leak, you must use the tools & techniques mentioned in the above document. Just looking at the total free & used memory, or the memory numbers Activity Monitor shows you for each process, does not begin to provide enough info to tell anyone what's really going on.


No matter how you try and paint it. If all Free and Inactive Memory is consumed by Mail, iTunes, or Safari... that's a problem. You can try and lecture me about Page Filing and how it's an intended design, as if I don't already know. But at the end of the day, this problem is being validated by numerous users.


So unless you'd like to argue that it's normal for Safari (with 3 tabs open) to use 2GB of RAM... or Mail to be using 4GB of RAM. I see no point in continuing this conversation.

Jul 27, 2011 8:45 AM in response to mightymilk

mightymilk wrote:

No matter how you try and paint it. If all Free and Inactive Memory is consumed by Mail, iTunes, or Safari... that's a problem.

It isn't that simple:


First, running with almost no free memory may just be because the memory manager is retaining a lot of resources in inactive memory for later use. Free memory is immediately available because it is not being used for anything. Inactive memory contains data that isn't actively being used but may be used later. When more real memory is needed, if the memory manager determines some of the data in inactive memory will not be used again, it will either be purged outright (if it does not need to be saved to disk) or written back to disk (paged out) & then purged. But Activity Monitor does not show what is in inactive memory, or if or when it will be reused. So just looking at the total free & inactive memory numbers, or the real, virtual, etc. numbers for a process, won't by itself tell you if there is a memory use problem or not.


Second, if there really is a memory use problem, it is not necessarily due to a memory leak or any other flaw inherent in the app. For example, as several reports in this discussion make obvious, the problem may well be an incompatible or out-of-date third party add-on. What isn't so obvious is this can include some additions that seem totally unrelated to the app using up memory. This isn't uncommon when upgrading the OS -- some additions are patched onto often used routines & if not fully compatible with the new OS can cause unpredictable behavior in any process that uses those routines.


For things like this, Activity Monitor may be able to tell you that you have a problem, but it can't tell you its cause. For that, you need to use other tools & troubleshooting techniques. For instance, a safe boot or logging into a newly created test user account may help with this, or checking system logs. If you just assume the app itself is at fault without investigating other possible causes, you may overlook the real one & never eliminate it.

Jul 28, 2011 6:40 AM in response to R C-R

This morning, after leaving my Macbook run all night with no apps launch I come to a machine with only a couple hundred MB of free memory.


Is this not a memory leak? I have the same thing happen after a day of normal use (with several apps running).


Now the system doesn't seem to be especial slow, but I was told a while ago by a "Genus" at an apple store when available memory gets low I should reboot.


Is Lion just managing memory much differently from OS X 10.6.??

Jul 28, 2011 7:30 AM in response to ColoradoiPodUser

Even if you don't launch any apps there are quite a few processes that the OS runs in system space -- in fact, just logging into your account starts up quite a few processes in user space. Most processes are "faceless" -- they have no user interface -- so you may not be aware of them.


Also, the memory manager does not release previously used memory to the free space pool until there is a reason to do so. Typically, quitting a process won't release all the memory it used, in part because some of it is shared with other processes, & in part because some other processes may be able to use some of it. How the memory manager works is not easy to understand (see the previously mentioned developer document if you want to tackle that subject) but it isn't so simple that just looking at free memory will tell you if you have a memory leak or not.


As several have mentioned, the most useful number Activity Monitor gives you is the page outs. Lion actually gives you two numbers. The first is the cumulative amount of memory paged out since the last startup; the second is the recent rate at which memory is being paged out to disk. If these numbers (especially the second) suddenly start increasing it means the memory manager has run out of real (physical) memory for the running processes & your Mac will slow down while the data has to be paged out to the disk. (Page ins are not as serious because much of what is paged in can be discarded without having to be paged back out to the disk.)


Brief, occasional page outs don't have much impact on performance but if they occur repeatedly lead to "disk thrashing" -- constant disk activity when you try to do almost anything. This is accompanied by frequent appearance of the spinning "beach ball" cursor, the OS's way of telling you that you must wait for it to finish doing something before it can process your request.


If you see no slowdowns or frequent beach balls, you almost certainly don't have memory issues.

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.