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

Mar 4, 2013 3:56 PM in response to david koff

Mon 4 March 2013: 3 55 pm


Thanks for your post, David.


@all, if you need to figure out which version you are running, open Terminal (found in Applications/Utilities) and type the following:


java -version


It'll return the version like this:


java version "1.6.0_41"


It's really a good idea not to be allowing Java to run in your browser at the moment as there have been several security issues. I've not heard any updates for a week or two, so maybe that's been cleared up, but either do your homework to be sure, or turn it off in Safari.


That said, there was just a JVM (Java Virtual Machine) update a day or two ago.


Following David's advice and posting your results will contribute to this thread and to those attempting to address memory problems in Lion and/or Mt. Lion.


codefish out.

Mar 12, 2013 4:39 PM in response to david koff

When visiting this website: http://www.dainese.com/us_en/motorbike, I have uncovered a memory problem in Safari, version 6.02. Visiting this site with Javascript enabled results in run-away memory usage. Visiting with Javascript disabled avoids the problem. Visiting with Chrome leads to the same results. Visiting with Firefox does NOT lead to a memory problem.


Turning Java on or off has no effect.


Seems like Safari and Chrome do not catch a runaway Javascript efficiently. Very annoying. Apparently Firefox is the way to go.

Mar 12, 2013 6:32 PM in response to mightymilk

JavaScript and Chrome aren't an issue for me. My issue comes from the DAVSafari (I think that's what it was called). Also, when I open safari and bookmark, my computer instantly locks down.


The thing is, I've been using chrome. Yet, every day when I get home from work at 3:30, the safari program consumes 12+GB of data.


This is absurd. Why hasn't apple addressed and fixed this issue yet? I'm sure enough people have called, complained here or reported it through the crash status.

Mar 13, 2013 12:00 AM in response to AppleTV Fan

I tried to recreate your situation.


CPU percentage goes way up, eventually exceeding 100%, fans come on. active memory begins steadily increasing.


All this per Activity Monitor readout.


Closing the page drops the CPU percentage back to normal range, but active memory remains at the level it achieved before closing the page.


Quitting Safari causes the active memory level to immediately drop back to a more normal range.

Apr 11, 2013 9:44 PM in response to codefish46

In my case I have found that memory is consumed and not returned. A simple test from startup with no swap space consumed shows my browser consuming 1GB of memory with 800MB of swap. When I quit the browser I see approx 500 MB of memory returned to the system and 356 MB of swap space is not freed. If I run the browser for a couple of hours under normal usage I see over 3GB of swap space consumed and my system becomes increasingly sluggish. When I quit the browser I see around 2GB of swap is retained. Clearly OSX is not freeing up swap space correctly.


Seperately it would be nice to have a config option to release paged memeory if not used for a certain period of time. For example 24 hours would wrk well on my system.

Apr 11, 2013 11:59 PM in response to boosth

Swap is funny. If your Safari is using 1Gb of RAM and that causes 1Gb of swap space to be created, killing safari will not free up the swap space UNLESS part of Safari was swaped out itself. Swap is where the little used memory from ALL running programs goes, to make room for memory of the running parts of programs. So, that swap space will likely stay high in use because of all the running programs that are not accessing that memory are still running and still not accessing that memory.


The main thing here is (1) safari tends to use up a lot of memory, like many browsers, especially on serious JS-based websites (e.g., iCloud, which feels like real applications, is running tons of JS); and (2) some browsers do a really good job of freeing up memory when you close the window, e.g, Chrome and maybe firefox, but definitely NOT safari.


So you have to quit safari on a regular basis if you happen to go to websites that consume a lot of RAM, OR, you need to switch to Chrome and then all you need to do is close your window from time to time.


This all completely ***** but is not specific to Lion in my opinion. The main thing Lion brought is some sort of new memory system configuration which causes stuff to be swapped out when you're doing things like examining the file system. I am too tired to explain what I mean, but the end result is Lion swaps a lot more than anything before it. This doesn't actually matter if you have an SSD instead of a HDD. HDD's are super slow in comparison to SSDs and this new memory strategy seems to have been created with the SSD in mind.

Apr 12, 2013 8:27 AM in response to Bobdc6

So I finally upgraded to a 512 GB Crucial SSD and voila the beachball is gone. The free memory still tends to fill up but I noticed that if launch an application at that point, the inactive memory quickly frees up (possiblly because of extreme speed of SSD). Also when I purge, it happens instantly unlike before when it would take forever to complete. So I am assuming the problem is still there but doesn't really matter in practical terms since the SSD speed takes care of any lag.

Apr 12, 2013 2:43 PM in response to Bobdc6

The likely cause, Bobdc6, is that your 4GB of RAM was pretty well full up with not just the 1.5GB of browser stuff but of course critical OS stuff & other stuff as well, plus your HD was likely pretty well full up, too.

When RAM gets full up, the OS does intensive virtual RAM stuff (i.e., swap files). But if both your system RAM & your HD are too full up for even the OS itself to function efficiently, much less a browser, then just about everything you run beach balls for a long time & if the cause of that is not rectified, the OS just quits working, a lot of times. Got to give the OS breathing room! 8GB is best but at least, bare minimum, 6GB, especially when you have only 4GB of RAM, about 2GB of which gets sucked up by the OS itself.


My suggestion is first, max out your MB's RAM. The 2007 can use anywhere from 4GB to 6GB max, depending on the 2007 MB model. You can go here --> http://www.everymac.com/systems/by_year/macs-released-in-2007.html to find out what your particular 2007 model's max RAM capability is.


And of course, if you're short on HD space, clean up. A good util to do that with, for starters, is Monolingual. And you can also wipe out everything in your OS's printers folder, stuff that comes stock with the OS, and then plug in whatever printer you do use so that OS-X will sense its presence & download the appropriate drivers for that printer and only that printer via Software Update. BIG HD space recovery doing that. Or clean out the Printers folder & then run your printer's drivers/SW installer to get the drivers plus the extra goodies that your printer's manufacturer offers for that printer, if you want that extra stuff.


Good luck....😉

kk

Apr 12, 2013 2:51 PM in response to bellicose100xp

I've had a 256GB Crucial SSD for a year & a half now & man oh man, just like my switch back to Mac 5 years ago after an 18-year foray into The Dark Side of Windoze & Microsoft, I'll never go back to a spinning-disk HDD. My SSD is faster than any HDD I've ever had, and it's really nice to not have to worry about an HDD's read-write heads bouncing on a platter & screwing up saved memory, or possibly toasting the whole HDD itself. I've got a line on a Samsung 512GB SSD right now for only $350 NIB, & I might buy that today but definitely, within the next week. Really looking forward to having double the space, and it being an SSD, too. kk

Apr 15, 2013 2:04 AM in response to codefish46

Help sought from anyone!!!

My iMac has suddenly developed the memory drain. I have an i5 3.1 ghz mid 2011 model running 10.7.5 with 20gb ram installed.

The memory drains to virtually zero then shows up as partially inactive on the Memory Clean app. I release the memory with the app and it slowly drains again.

The only recent change to my set up is to format a new buffalo 2tb drive. This is currently disconnected though as I don't need it just yet.

Reading the threads I am at a loss as how to fix.

Any advice most welcome.

Apr 20, 2013 8:26 AM in response to kevinkendall

Thanks KEVINKENDALL. My 2007 MB is maxed out at 4g ram, but I'm running a Curcial 256 SSD at 50% free space. That event was one time, and hasn't happened again.


I notice that Apple is shipping brand new MB's with 4g ram and optical drive and I wonder why they do this if 4g isn't enough for their own browser even with a SSD sometimes.


I have a feeling that Apple will go to all SSD's for MB's in a couple of years in order to attain similarity with iPad apps. They may even have a touch screen.

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.