Previous 1 2 3 Next 957 Replies Latest reply: Dec 1, 2013 1:28 PM by Jonathan Payne1
mightymilk Level 1 Level 1

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)
Reply by Christopher Boerger on Jul 21, 2011 10:33 AM Helpful

It appears in Lion Safari, or specifically the SafariWebContent component has a memory leak. Many folks, including myself are seeing that process gobbling up memory over time.

Reply by Michelasso on Sep 16, 2011 10:44 AM Helpful

I don't bloody believe this. I wrote a full answer, just pressed delete to correct a word and Safari went one page back erasing everything.

 

In any case, fast answer: it doesn't work like you say. The confusion lies elsewhere.

 

1. Check what it happens with the inactive memory in the kernel:

 

Page Out:

  • If a page in the active list is not recently touched, it is moved to the inactive list.
  • If a page in the inactive list is not recently touched, the kernel finds the page’s VM object.

 

Page In:

When any type of fault occurs, the kernel locates the map entry and VM object for the accessed region. The kernel then goes through the VM object’s list of resident pages. If the desired page is in the list of resident pages, the kernel generates a soft fault. If the page is not in the list of resident pages, it generates a hard fault.

 

 

The kernel has to search for the VM objects. The VM objects are not referenced by the physical pages. Even less the processes, then. Thus it knows nothing about the processes "owning" the inactive pages unless it goes looking for it. A process to know its inactive pages should make some system calls that through an API ask the kernel to do a job that isn't implemented. Those system calls are simply non existent.

 

2. The inactive memory is not a cache either. It is the physical memory that has been already used by the processes and got old. Which means sooner or later it will cause page outs which is undesireable or become active again keeping stealing RAM to the other processes. Unless the process decides to release some on its own, sure. The speculative memory instead is a kind of "pre-cache". The speculative pages are reassigned at no cost to the free list as soon as free memory is needed. While the inactive pages may require a disk page out  Thus to have Safari or any other process raising constantly in memory isn't good for the whole performances of the system.

 

I don't really understand how anyone can say otherwise.

 

Oh, btw. The BSD's man page for man is stating that man can be used as a concise reference, especially when programming, but it can not substitute a manual. Nowhere it is stated that they are incomplete on purpose. Unless in English concise and incomplete are synonymous. But it wasn't so the last time I checked. And since they are words with a Latin root, I am sure that isn't the case anyway.

All replies

  • bobwild Level 4 Level 4

    I am running Safari (4 tabs open), Mail, iTunes, Activity Monitor, and terminal. Out of my 4 GB of ram currently 2.16GB free. I have only been powered up for 30 mins though.

     

    Just because LION is using up all 4GB of ram, it is not necessarily a bad thing. OS X uses the RAM for its many processes. With just 5 apps open, I have 101 processes active at this moment. Most of those processes are running all the time

     

    You are going to have problems if all the RAM is active and processes and apps have to page in and out from RAM.

     

    Are you experiencing slow response from apps?

     

    From my experience Logic, Final Cut, or Aperture are apps that do use a lot of system resources, RAM and CPU and depending on how heavely you use them you may need 8GB of RAM. I only have 4GB of RAM and when I have a lot of work to do in Aperture I will shut down Mail and Safari. Especially Safari which does use lots of RAM.

  • mightymilk Level 1 Level 1

    I understand there are pbackground tasks going on, beyond the standard GUI applications.  But to answer your question, I'm getting system hangs that last anywhere form a few seconds to many seconds.  I believe it's because the computer is PFing like crazy, because OS X is using every available resource to run Mail/Safari/iTunes.

     

    I wouldn't consider Logic, Final Cut, or Aperture light on system resources though.  As an example, Recording/Playing about 6-8 tracks in Logic with multiple plugins can easily grab 1GB of RAM.  Final Cut when rendering can also grab 1GB of RAM.  This wouldn't be a problem if OS X wasn't taking all my resources.

     

    As an additional note, Safari seems to be the main culprit.  There's a process linked to Safari called "Safari Web Content" that was easily using 950MB of RAM... with 3 tabs open.  I can't tell if it's a memory leak or what.  It won't release RAM by closing tabs, you have to completely quit the application.

     

    In any case I appreciate the response!

  • bobwild Level 4 Level 4

    My Safari Web Content was using 333MB of ram when I hit reply here, and now its at 316MB. Sorry I don't know what it does.

     

    One question, after your Lion install has your Spotlight indexing completed? it will make your mac significantly slow until it completes.

  • mightymilk Level 1 Level 1

    Yea, unfortunately that's not it.  Indexing was completed sometime yesterday, and the systems been restarted since then.  I'll follow up with a screen shot in a minute.

  • Christopher Boerger Level 1 Level 1

    It appears in Lion Safari, or specifically the SafariWebContent component has a memory leak. Many folks, including myself are seeing that process gobbling up memory over time.

  • mightymilk Level 1 Level 1

    I guess I jumped the gun a little, Safari does seem hogging the majority of memory when my system gets low.  Evertying else Mail, iTunes, iChat, App Store, FaceTime are all 200MB or less.

  • BroSter Level 1 Level 1

    I was having this problem as well, so I decided to try John Gruber's advice. I uninstalled Flash and set up Chrome as a back-up for the Flash pages I HAVE to access. The memory that Safari is using has now dropped dramatically, and everything is much more responsive and quick. Here's a link to John's method at doing this, if you're interested.

     

    http://daringfireball.net/2010/11/flash_free_and_cheating_with_google_chrome

  • SingingFriar Level 1 Level 1

    This is a major problem.  I updated to the latest version of Flash and that didn't help.

     

    Flash in Chrome seems fine and the memory usage is completely acceptable.  What a bummer as I really like the new Safari.

  • mightymilk Level 1 Level 1

    I'm not entirely convinced this is the Flash problem.  Flash Player has it's own process in Activity Monitor and it's usage is only about 120MB... Safari Wes Content on the other hand is using well over 1GB.  I know there's been a lot of problems with Flash on OS X, but this one looks like Apple's fault not Adobe. 

  • Thebestplacehere Level 3 Level 3

    I shall say that i was finding that what before use 4gb was open aperture and may WOW or Warhammer online but now just mail safari and 4gb use.. May is that apple is using more ram to use less processor or may is how lion works or i dunno but i was thinking upgrade ram and now i am sure and from apple i think ..

    Oh 2011 imac with 2x2gb and two free slots..So 4gb and true with lion the ram always in almost all in use and no much free....

    I don't have flash installed..

    Also can be because all the apps are displayed in launchpad and may we running full apps and using other desktop i dunno exactly why but i think lion like ram and a lot ...

  • BroSter Level 1 Level 1

    Just to update my last post. Deleting Flash has helped my browsing experience quite a bit, but the memory use problem has returned.... I'm not entirely sure what's going on at this point.

  • mightymilk Level 1 Level 1

    I know as a Mac user, our first instinct is to blame Flash for browser problems but... if you look in Activity Monitor, you'll see Flash has it's own process and is not what's hogging all the memory.  The process using all the RAM is actually "Safari Web Content", which seems to be a component of Safari itself.

  • John Kitchen Level 3 Level 3

    mightymilk

     

    Go into Activity Monitor and check "Page Outs".  If the value is zero, then you have never had any RAM shortage since the last power-on.

     

    If it's not zero, then you have had RAM shortages.  Ignore the colored pie.  It's just a point in time RAM status, and tells you nothing about either the past or the peaks of demand.

    mightymilk wrote:

     

    Can someone explain what Apple is doing here? 

    Yes, I can explain what Apple is doing here. 

     

    RAM is a very cheap resource, so modern software uses it to save consumption of other resources.  RAM can be, and is, used to avoid I/Os.  Avoiding I/Os saves CPU cycles and makes the system quicker for you.

     

    For the last 40+ years, the golden rule of computer configuration has been "don't skimp on memory"!

     

    I know you don't like this answer, but if you are getting a lot of Page Outs, then buy more RAM.  In my experience, my MBP did not perform acceptably until I upgraded it to 8GBs.  But with Aperture, it was still sluggish, so I now have an iMac with 12GBs of RAM, plus SSD and fastest CPU.  Aperture is a professional application designed to scale, and use resources well.

     

    So why does Apple still sell 2 and 4 GB Macs?  To get the sticker price down and meet the needs of less demanding uses.  Users who do one simple thing at a time and don't use professional apps.

  • mightymilk Level 1 Level 1

    We're talking about Safari using anywhere from 1GB-3GB of RAM.  These are not Pro applications nor are they intended to have heavy system requirements.  You took my bilp about Aperture, Logic and Final Cut and took it completely out of context.

     

    With all due respect, I don't think you understand that Safari in it's current state will drain all available RAM over time whether you have 8, 12, or 24GB.  If you need me to explain the situation in more detail, let me know.

Previous 1 2 3 Next