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

Nov 25, 2011 6:13 AM in response to Mark MacKay1

Mark MacKay1 wrote:


They wrote bloated code and they need to trim the fat to make it run better.

Undoubtedly, some of the code could be optimized to use much less RAM, but that doesn't necessarily mean that would improve performance. In fact, if an app is working with large data sets, restricting its memory use will reduce performance since the only way to do that is to move lots of data out of memory to files. It doesn't matter if it is moved to VM files by the OS or to files created by the app -- the code & data has to be accessible somewhere.


You can easily reduce the size of the code & of the data sets by limiting what the app can do; IOW, by reducing the number of features it supports. For instance, if an app doesn't support any applicable OS X core frameworks, its memory requirements can be reduced greatly. But if it does that, it can't support the core services those frameworks make possible. If that doesn't sound so bad, consider that those services include everything from printing to hardware graphics acceleration.


Likewise, you could also remove OS and/or app support for computationally or data intensive recent & emerging standards like XML, HTML5, or H.264. You could limit the clipboard to supporting just a few data types & reduce or eliminate support for things like ColorSync or inter-application communication.


All these things will significantly reduce memory requirements & allow you to run lots of apps at once with no impact on performance. But the apps won't be anywhere near as capable as they are now, nor will the OS.

Nov 25, 2011 8:58 AM in response to TheSmokeMonster

I have not add system crashes, but I had horrible performance on all my applications. Too slow, they don't work right, they don't work the way OS X was intended to work. I have not submitted any feedback to the feedback unit at apple as of yet. Hoping that they read these things sometimes and they might actually act on it in subsequent updates. If I hadn't committed to Lion as I had, I would gladly get off of it and go back to Snow Leopard.


In the beginning, Steve Jobs said OS X was to be eye candy and since that day that's not even the case anymore. We don't have eye candy and we're back to square one with an OS that is very sub par. Thank you for letting me vent / rant. It helps sometimes but I will take you up on your suggestion to go to the feedback board and those guys know. Although I know they're overwhelmed with this iCloud thing.

Nov 25, 2011 9:11 AM in response to R C-R

Yes, virtual memory files could be eliminated but with that said, virtual memory files have always been there since OS 3 probably OS 2 they've just have been hidden since OS 4. You just didn't know they were there and they ran unobtrusively in the background and didn't eat up your whole hard drive. Ram use has always been a problem in the early days of OS 10. This is always been a fact and the engineers at Apple figured out ways to trim the budget and make things run within said budget. It can be done. It has been done in the past. They just need to think outside the box i.e. think differently.

Nov 25, 2011 11:47 AM in response to Mark MacKay1

Mark MacKay1 wrote:


Yes, virtual memory files could be eliminated ...

I think you might have missed the point: if you want the features the OS can support, you have to use real memory (RAM) or files to support them. It doesn't matter if you use VM files managed by the OS or any other type of file, hidden or otherwise -- if you don't keep the necessary data and/or code in RAM, you have to move it out of files into RAM every time you need it & write any updates back to the files every time you need to preverve them. That's very slow compared to leaving everything in RAM, which is why the OS tries to do that.


So, as features are added to the OS RAM usage goes up, even if the engineers do a perfect job of balancing RAM use against performance. You can see this in the steadily increasing minimum memory requirements for each new major version of the OS. Panther required a mere 128 MB. Each successive version has required twice the memory of the previous one, & Lion is no different. Each supports an increasingly diverse & more complex feature set, & each requires a substantial increase in the amount of RAM needed to do that without affecting performance significantly.


If you look at all the features that have been added to the OS & to the aps bundled with it over the years, it should be pretty obvious why this is so. Many of the technologies they support didn't even exist when Panther was released, or were so new that no consumer OS supported them.


And a lot of these features are not obvious to average users -- for example, I doubt few of us besides UNIX wonks know much about the "under the hood" changes in Lion described in this technology brief. Just by looking at the "250+" new features of Lion hype it is hard (at least for me) to get a good feel for which ones are mostly cosmetic or trivial & which ones require substantial system resources.


IOW, this isn't anything new. Apple constantly adds new capabilities to the OS, often ones that no other OS supports. You may not use them, or use them yet, but that doesn't automatically make them fat or bloat.

Nov 29, 2011 12:10 PM in response to mightymilk

Hi mightymilk,

Regarding Safari, Lion, and RAM consumption ... I just read through a lot of the support dialogue (but admittedly 36 pages is long ...) and wondered if you came to a resolution on how to get Safari to stop consuming the RAM? Did you try removing Safari and only running a different browser? I have a brand new MacBook Pro (i7, 8GB RAM.) Actuall this is my third brand new one in 5 weeks because the RAM keeps consuming itself, the business team replaces the machine after failing to repair it, and they seem baffled. The first report was that it was faulty video controllers that started on machine 1 and was simply reimaged as they copied my data to machine 2 and 3. Once that was discovered and the machine restored to factory settings we hoped I was all set. But I'm not. I'm new to Apple laptops and so have had a steep learning curve. I'm watching my activity monitor now and it appears that the (new?) issue is with Safari. As soon as it starts to act up it can consume all of the RAM in about 1.5 minutes. It does it with active processes and inactive processes.This is probably what this entire thread is about but Apple acts baffled by it.


I thought I'd ask how you've worked around it. I'm rebooting a few times a day to stop it. Can I just get rid of Safari?


Thanks in advance.

Dec 5, 2011 4:52 AM in response to Mac_Boston

Hi,


I have the same problem as Mac_boston, but not sure it is due to safari only. I have an MPB 17" mid 2010, with 8GB ram, and can't change it anymore. Since the last Lion update (10.7.2) I have completely reinstalled the OS 3 times. It's going well 1 or 2 days and then have to purge several times per hour in order to be able to have a working system.

I have also other trouble with safari, but not related to this thread.


Without doing anything else than surfing on this forum with safari for example, free memory is decreasing from 0.2 GB every 15 to 30 seconds, sometimes faster. During writing this message, I went from >5GB to now 473 MB free memory!!


I can't read well the activity monitor, but I've found that top processes for virtual memory are often mds or the Dock.

I've never had this troubles with Snow Leopard. So I'd be like others very grateful if someone could tell where to find help. Any hint or advice is welcome.


Thanks.

Dec 5, 2011 7:29 AM in response to pana_zyde

I'm wondering if I should install the latest update or leave well enough alone. With 3 tabs open, Safari Web Content is using 88 MB while Safari is using 120 MB or less of RAM. I found that the prior update made a big difference with respect to Safari Web Content on my old MacBook Pro, although I never had the memory problems that many folks are having.


Suggestions? Should I leave it as is given that I'm not having any issues?

Dec 5, 2011 7:52 AM in response to pana_zyde

Hi,


I've read this topic and I'd like to share my experience as well.

I switched from a 4 year old macbook pro to a early 2011 one, with Lion pre-installed.

I'm using the exact same applications when working, which are: Safari, Mail, Evernote, Matlab 2011a, iTunes and 2 backup demons (dropbox and backblaze).


I never had to worry about my RAM on my old machine, I had 4G like on my new one.


With the new Macbook on Lion, I noticed a very heavy RAM usage, even when I only browse the web and write on a lightweight LateX writer (so not Matlab).


Today, I tried to run a small Matlab script (doesn't use more than 400M of RAM), which I usually launched with 4 parallel sessions (so 4x400M = 1.6G of RAM) on my old machine without any trouble.


With Lion, a single, 400M session, lauched after a standard browsing usage for a couple of hours, resulted in 5G in swap, and a machine so unresponsive I had to wait 10m before being able to kill my process.


This could be caused by the programs I'm using, which maybe still have some problems with Lion, but everything is updated to the very last version, and I don't see any specific application using an unreasonable amount of ram in the activity monitor.


From what I read in this topic, this issue is so widespread that I can only be OS related...

Dec 9, 2011 4:48 PM in response to mightymilk

Has there ever been any response concerning the Lion Mail.app suddenly eating up all available RAM? I've seen a few people with this problem.


I've been using Mail.app daily ever since Lion released and, for some reason, a few days ago it just started going from working fine to eating up all available RAM (literally, all RAM...I end up with about 5mb available RAM, 224.19gb VM size, 29.08b Page Outs at 18.8mb/sec, 9gb swap used, etc.), inevitably within 30-40 seconds of launch.


Interestingly, Mail.app does NOT do this if I am offline.


I've been forced to switch to Outlook for Mac, which works fine but, you know, ew, hypercluttered Microsoft UI.


Anybody know of any solutions to this? This just randomly started popping up the other day, and I can't think of anything I had done differently before this started happening.

Dec 9, 2011 4:54 PM in response to barry273

I'm the same. Been like this ever since Lion came out. Done everything possible that's been mentioned and no solution. Sometimes it gets so bad the trackpad has a mind of it's own and everything I touch gets dragged everywhere. Just seen 'Postbox' and wonder if this could be temporary solution. I'm now concerned that it will never get fixed.

Dec 9, 2011 5:16 PM in response to pimeye

It's really great. I can't even rescue my e-mails from Mail because it exports e-mail into a completely non-standard MBOX format (that is, it claims to be export MBOX but the MBOX it produces is not readable by any other e-mail client), so my only other option is to either:


1) Drag my 4,000+ emails one by one into Outlook

2) Copy my e-mails in Mail into a Gmail IMAP folder, let them upload, and then download them in Outlook

a) Which will be really fun with my 5mb of available RAM


Really neat how my Apple e-mail program can bring my i7 Macbook Pro crushing to a halt while digital multitrack editing of 1080p video source runs perfectly fine.


(I'm assuming this will be fixed eventually!)

Dec 15, 2011 8:07 AM in response to Andrewvoid

I think the problems everyone is experiencing may have something to do with the cloud. My wife's macbook, early 2008, was updated to Lion a few weeks ago, and since then applications like Firefox, and Contacts beachball for minute after clicking or hitting the enter key. I went into her settings and turned off all connections to the cloud, restarted, and it runs faster than ever. i am not about to spend my time trying to debug what Apple did wrong there, but it is obvious that it is not working as planned. While the cloud is convenient, it is only convenient if you can still use the computer to do routine tasks. If it interferes with those, it becomes superfluous. I hope this helps others who are experiencing performance problems.

Dec 15, 2011 4:44 PM in response to Elgatoil

Could it be, that your wife's computer just had to be restarted after installing lion? Lion takes some time for your computer to settle into, with spotlight indexing itself and icloud populating data like contacts, your computer and your network may be slow for a short period of time after installing lion.


I've never experienced an issue like the one you are describing for iCloud. I think it would be your isp before it would be the cloud.

Dec 16, 2011 5:25 AM in response to mightymilk

I happen to agree. I never used to reboot my iMac 27" (16GB RAM) before upgrading to Lion. Now I'm having to reboot it every 2 days! It is totally unacceptable. I started doing some investigation using the Activity Monitor and realized that the "Dock" process is consuming 9GB of "real" memory. That's insane! I don't know if it's because of my Fusion but it seems to be related. I have a Win7 (2GB RAM) vm running all the time, since I purchased my iMac 2 years ago, and I've never had to reboot because of it. I really, really hope Apple does something about this soon.

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.