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

Dec 16, 2012 9:07 AM in response to JeepRuby101

Hi JeepRuby101,


There's something wrong with one of the web pages you are looking at. Your Safari has pegged one of your CPUs and is consuming RAM as quickly as your OS will allow it. No amount of RAM will solve this problem. You are on some website that has a bug. So, can you share the website with us so we can see what's going on?


If your computer were messed up BECAUSE it's low on memory you'd see different behavior. Your computer is screwed up because Safari is pegging the CPU (just one of them, but that's because JavaScript runs on a single thread), and it is consuming your memory up the wazzoo. The time to quit (or force quit, in this scenario) Safari is as soon as you see the CPU pegged like that.


So please, share the website you are often using when this happens.


And I say again, just because the window is closed, it does not mean it is not stuck, consuming memory and CPU like in your screen shot. You absolutely have to quit it, so there is no little "dot" under the safari icon in the dock, and if the process is running away as seen in your screenshot, Quit from the menu is not enough, and you need to Force Quit it (which you do by pressing the Option/Alt key after you right-click on the safari dock item).


Let me out this to you another way: if Safari shows up in Activity Monitor, it's running. So kill it from there if you want.


This problem is solvable. Let's just do it.

Dec 16, 2012 10:39 AM in response to JeepRuby101

You had something else open previously then. This is what you need to do:


1) kill safari and convince yourself you have done that properly

2) leave activity monitor running for future reference so you can tell when Safari starts misbehaving

2a) In other words, look for one of your CPUs pegging

3) Make a note of the website you are on when you first notice the problem, OR, think about websites you were PREVIOUSLY on.


Until you successfully kill and restart Safari, there is no hope of tracking this down. There's no way this website is causing you your problems.

Dec 16, 2012 11:10 AM in response to kyle321

Well not to **** off all the observers of this thread with too much email, but:


1) Java and JavaScript are two separate things.

2) Javascript is definitely the problem here.

3) The only thing we need to do is make sure jeepruby exits safari all the way and then some time in the future notice which website is causing JavaScript to run in an infinite loop consuming as much memory as possible.


That is literally what is goign on here, so turning off JavaScript will just confirm what we already know without giving us any insight into what website is causing the problem.


Come on JeepRuby, don't leave us hanging ;-)

Dec 16, 2012 11:20 AM in response to kyle321

I worked on the original Java project at Sun Microsystems back in 1992 before anybody had ever heard of Java. Not the same framework. Only thing in common is the name.


I can write a piece of JavaScript that causes the CPU to peg at 100% AND grow the memory unbounded. In fact, right at this very moment I am programming in JavaScript for my current project and just the other day I made that exact mistake.


I am pretty sure of my facts here.


Cheers mate!

Dec 16, 2012 11:31 AM in response to Jonathan Payne1

Jonathan, I'm not trying to be argumentative here, nor debate credentials - I've given readers a few pointers regarding this problem so now it's up to the folks reading this blog to decide on next steps.


BTW, this problem will occur on many sites, not just a "broken" one, so waiting for someone to get back to you regarding a particular site is pointless.


http://www.informationweek.com/security/application-security/java-vulnerability- affects-1-billion-plu/240007985


Good luck all!

Dec 16, 2012 11:39 AM in response to mightymilk

I delayed upgrading to Lion because of following this thread, in fact I never upgraded to Lion. A week or so ago I upgraded from Snow Leopard to Mountain Lion and so far no issues at all. I would tend to agree that those still having problems with Mountain Lion have some sort of issue going on that doesn't affect everyone. So far I've mostly been using Safari, Mail with some VMware Fusion thrown in, all with no problems.


I hope those of you running into issue can identify the cause and get it corrected. At least with Mountain Lion things are working well for me.

Dec 16, 2012 9:51 PM in response to gbullman

Curious as to why CPU issues are appearing in a thread about memory utilization problems? I guess they can be related....but in my situation I posted here about a virtual memroy leak that eventually causes the system to seize up and I have to reboot. Not a big deal - as long as I remember to just reboot the system every few days so it never gets to that point. Obviously there are one or more system processes or apps that are creating this issue - and have been for some time for a number of people. But there's a simplel workaround - so not a big deal. Anybody heard about fixes to this issue?

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.