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

Apr 27, 2012 7:42 PM in response to Quantum3

Quantum3 wrote:


It's about adding RAM and/or SSD's or about the good managment of memory... Kind of "create the problem, then the solution" thing. The "buy more RAM" vs the "Apple do a more efficient OS" thing as well, don't you think?

Yep.

But while the corporate gears grind apparently slowly away..... (which is uncharacteristic of Apple, generally, which causes a big blob of eyeblinking perplexity in this memory semi-management problem we're all talking about here) ....with software & hardware Apple engineers fixing the memory management problems with updates, the only alternative is to do whatever *we* can, which namely is to do what we can to improve our odds for having any appreciable amount of "free" memory available in reasonable circumstances, in any way we can.

Which means...... tada!...... ponyin' up the bucks 😢. That's Plan B. Plan A, of course, is having that/those Golden Updates.

Bright side to those circumventing schemes though, is that when the memory management updates DO come out for yer mega-RAM super-SSD souped-up machine, boyhowdy, yew gonna have a FLYIN' system!

Gotta look at the bright side in the storm man. God said so. 😉


My own personal "fix" was the simple little dinky oh-so-helpful Automator-spawned "Purge_RAM.app" I made & posted somewhere in this string a little over a month ago (and which within the last month has been downloaded by about 80 people. All a little happier now dealing with their own computers' RAM memory probs, I hope).

https://www.box.com/kevinkendall-public

Quick & effective gadget. Give it a try, Quantum. Makes things work again right quick when they oughtabe, but aren't.


Hey..... I know what's going on..... the insurge of new rightwing linear-brained number-crunching problems-loving Windows people into the leftwing high-quality-conscious artistic-minded visual Mac World..... they brought their Dark👿Forces with them man. 😮 hehe


KK

Apr 27, 2012 8:14 PM in response to kevinkendall

Haha... Love crazy people 😁


What about the purge command in Terminal. I use that one to free RAM. However, it's strange that for example, the whole system performance is slower in Lion (even if you have free RAM) than in SL. However, I could buy a MacBook Pro with Lion few days ago and it works like a charm. I think it's not a matter of how many things are installed in the system since I have SL installed with all the same stuff than after upgrading to Lion. I noticed, for example, that the mds task in the tasks monitor, consumes a lot much more RAM in the MacPro than in the MacBook Pro (don't know why).

Apr 28, 2012 1:11 AM in response to Quantum3

Quantum3 wrote:


Haha... Love crazy people 😁


Ditto. 😁 Gives the Mediocre Majority something to gauge who they themselves are, since they largely lost that due to their descent into the comfortable numbness of group-following banality. Philo 101, Plato's "Allegory Of The Cave"

"Crazy" people (as opposed to "CRRRAZY people") are a gift to those guys. lol


Quantum3 wrote:


What about the purge command in Terminal.

What about it? You mean besides that it's a single syllable word, starts with a 'p' & rhymes with 'urge,' which is what we're all urging Apple to do with that annoying memory management problem? Well.....

My "Purge RAM.app" IS that "purge" command and ONLY that purge command, Quant. No filler, just the command, and it's been turned into a click'Ngo self-executing app. Just double-click it inside a Finder window, or single-click it when it's been placed up in the Finder windows' toolbar. Does in about 5 seconds or less what opening a Terminal window, typing in purge, hitting Enter, waiting for purge to finish, quitting the session, then closing Terminal takes much more longer to do.

You haven't checked it out yet, have ya Quant? 😐

https://www.box.com/kevinkendall-public

It's nuthin' special really, just a very quick & handy self-executing commandline command, works just exactly like a plain ol' text-based batch file in Windoze does.

Apr 28, 2012 11:15 AM in response to mightymilk

I suppose it's not too late to reply to this topic. I too, have been disgusted with Lion because something broke the memory management. The initial serious issue was Safari: that thing leaked memory like a sieve and had you swapping in no time. But the Google fixed Chrome on Lion (initially it was broken) and chrome has the decency to free up all its memory when you close one of its windows.


But the main thing I have noticed is that Lion swaps way more than Snow Leopard. I have 4Gb of RAM and I literally never swapped. I have a widget which shows me when I am swapping and it was always 0.

Since Lion it can be anywhere between 1 to 3 and somethings 4 Gb of swap. ***!? That is outrageous. I certainly didn't change my habits from the day before when I was using Snow Leopard so what was it? Well, I never found out. But what I figured out by accident later is, Swapping doesn't matter if you have an SSD instead of a regular HDD. Memory-based "disk drives" are so fast you can swap stuff back in and barely notice. So my theory was that all the Apple engineers were just developing on SSDs and they changed the system parameters to favor one sort of memory management over another, and nobody noticed it was destroying the experience of everyone with regular hard drives. To put this into perspective, my 1 year old, 4Gb MacBook pro was completely hopeless on Lion. I was annoyed and disgusted by the whole affair. Then I got an SSD and I am happy again.


Don't get me wrong. I am ****** off at Apple for having this problem. If there were an alternative I'd be so gone. However, I have come to believe that this is a bug. After reading around people seem to think that the "inactive" memory is allowed to grow and grow (that's one thing) and that the file cache seems to be configured in such a way that it is constantly pushing real application data into swap. There is no other wray for me to explain why my wife, who runs Chrome and Mail and a few other things is now swapping to the tune of 6Gb. SIX Gb on her 4Gb laptop.


Then I happened to notice that if I run "fs_usage" to see what file system activity might be running, I found that my Mail.app was performing a scan of my extensive mail archive pretty much constantly. 110k file stats per minute that first day that I checked. And I though, if that's reading a huge file system hierarchy (I have all my mail since 1997) constantly, maybe that file cache churn is causing my swap problem. So I killed Mail.app, rebooted my computer, resurrected Thunderbird email (man does it suck in some ways) and I was running for 24 hours with only 400Kb of swap. That's KB not MB or GB.


I find those results interesting and they give me hope, assuming anyone in apple would ever care to get to the bottom of this problem. So let me summarize: I think Mail.app gets in this mode where it scans the file system and sometimes it just goes nuts. That causes other file access to be slow (I had really BAD problems with my original non-SSD computer on Lion, and I bet this was why!) and it causes programs to get swapped out. And once you swap on a non-SSD system it's pretty much game over.


Today I am back on Thunderbird again. Been up and running for 8 hours and my swap is still at 0. I don't know - I think I might be onto something ...


Or not ...

Apr 28, 2012 11:47 AM in response to Jonathan Payne1

Huh. This is interesting.


I've never actually paid attention to my memory usage, but a quick glance at the System Memory tab reveals 4.86 GB swap. I'm guessing those are the files that sometimes mysteriously appear in /private/var/vm when I'm not looking.


I was wondering why applications run slow when I cmd-tab to them after letting them run in the background for a while. Now I can hit the play button in sibelius/logic/whatever and watch in activity monitor as real memory usage increases in time with clicks and hiccups in the audio. :<


I also ran up tons of swap on 10.5.8, though, so who knows. Probably just need more memory in general.

May 1, 2012 2:11 AM in response to mightymilk

Few days ago Safari started to behave crazy. Just after reboot, Safari was using all available RAM. I was using Resume and I had always the same tabs open. I checked the memory usage and it basically behaved like this:


- Grow the real memory up to 4-500MB

- In few seconds it went up to 1GB

- 1 second later it was using all RAM; with a total real memory of 1.5GB:


User uploaded file

I had two windows open. Closing one window and restarting Safari it was fine, back to 500MB. Restoring both windows (with Glims), closing the second one and restarting Safari it was back to 1.5GB. So I closed one tab after another and eventually it was "fixed". Opening a new tab and loading the same web site it didn't overflooded the RAM.


This is what we are dealing with Safari. I wonder how many bugs like this are in it. And any other application to be honest. I opened a bug report, hopefully the devs will look at it.

May 24, 2012 9:58 PM in response to kevinkendall

Kevin,


I bought an imac today and upgraded to 8g of ram. This is my first mac, and I was shocked to see that I could watch the available RAM literally dwindle before my eyes. I was honestly pretty upset about it, and I thought about returning the computer until I found your purge app.



Normally I'd never take the time to log in and actually post at places like this, but I wanted to thank you for that app. In on second your app clears my RAM right up, giving me back my 6.5g of free memory. THANK YOU so much, and I mean it. I can now enjoy my Mac experience without obsessing over the vanishing memory.

May 25, 2012 1:20 AM in response to BlackNova

Yes - it is one of several huge disappointments from Apple this past year. I have not heard that they "tuned the VM subsystem" in 10.8 but I hope you are right. It is a huge disgrace and it rendered many of the hard disk drive based systems quickly unusable. I only solved the problem by getting a SSD, where swapping happens so fast it doesn't matter.


So yeah, Apple, I know you read this stuff because sometimes you throw out my messages if they are not nice enough. 10.7 was a huge let down and you should have fixed it BEFORE you started focusing on 10.8. Time Machine over networks (as opposed to local hard drive) and the VM subsystem all went south in Lion and should have been fixed. Developers at Apple should be using HDD-based systems so they know how they are impacting the vast majority of their existing users. Features like "automatic restart" of applications when you reboot is not feasible on HDD-based systems and should literally be disabled. Who needs to wait 10 minutes for the machine to boot, displaying a bunch of screenshots of windows that literally do not respond to input for 5 minutes? That 4G of RAM is not enough for the average user anymore is classic Microsoft nonsense and the fact that Snow Leopard improved the situation of Leopard made it the best OS release in the history of OSes.


Here's to hoping Apple gets it right in 10.8.

May 25, 2012 1:34 AM in response to mightymilk

My problem with memory usage related to the Dock app, which was jamming up and occassionally bringing the system down.


I've since discovered that a couple of the pictures in my background images folder were at 40MB. Converting these to lo res images appears to have fixed the problem. On Apple's advice I also did a restart in safe mode and worked like that for a while, which may also have helped.


The only memory problems now relate to Adobe CS5 and particularly Suitcase Fusion, which really slows workflow in Illustrator.

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.