8 Replies Latest reply: May 25, 2012 9:18 PM by dymar
dymar Level 1 Level 1 (0 points)

I consistently find that when using Safari (or Firefox), within a short period of time (sometimes even less than one hour), the browser has taken over nearly all available memory. This happens even when the browser is the only program in use, and when no webpages with extensive audio or video content are open.

 

Can someone explain to me why this happens -- i.e., why web browsers seem to hog all the memory they can find -- and (more importantly) whether I can take steps to prevent it from happening?

 

Thanks.

 

As an example, my current System Memory readings (from Activity Monitor), with only 'Firefox' and 'Activity Monitor' open, are:

Free memory . . . 74.9 MB (but frequently dropping to less than 10 MB)
Wired . . . 228.4 MB
Active . . . 1.20 GB
Inactive . . . 504.5 MB
Used . . . 1.92 GB
VM size . . . 31.99 GB
Page ins . . . 292.1 MB
Page outs . . . 120.6 MB
Swap used . . . 518.7 MB


MacBook, Mac OS X (10.6.3), 1.83 MHz
  • 1. Re: Web browser leakage uses up almost all memory
    BGreg Level 6 Level 6 (17,500 points)

    Is there a performance issue you're exploring or is this more an academic question about how OS X handles memory management? One observation is that your page ins is very large, indicating that you can use more memory for the tasks you run. Normally, you look for page ins to be 10% to 15% of page outs and yours is a little over 40%. In a perfect unlimited memory world, page ins would be zero.

  • 2. Re: Web browser leakage uses up almost all memory
    dymar Level 1 Level 1 (0 points)

    BGreg wrote:

     

    Is there a performance issue you're exploring or is this more an academic question about how OS X handles memory management? One observation is that your page ins is very large, indicating that you can use more memory for the tasks you run. Normally, you look for page ins to be 10% to 15% of page outs and yours is a little over 40%. In a perfect unlimited memory world, page ins would be zero.

     

    Thanks for your reply.  I wish it were only an academic question.  The result of the situation I've described is that eventually system slowdowns make it impossible to get anything done (the 'spinning beach ball' owns everything).  Also, the fan tends to be on all, or almost all, the time.

     

    The 'reset' button is the only solution I know of, but that means the loss of all open windows and tabs, and I usually have quite a few of those open.  I also don't want to start going from window to window bookmarking them all.  Even if those in each window can be batch-bookmarked, it's still a lot of work, and seems like something that shouldn't be necessary.  Why should a browser eat up (or render unavailable) nearly 2 GB of memory?

  • 3. Re: Web browser leakage uses up almost all memory
    BGreg Level 6 Level 6 (17,500 points)

    How much free disk space do you have? While the web browsers may be contributing to memory usage, I'm not sure I'd conclude that's what's killing performance.

     

    Two FAQ's to look at that may provide some guidance:

     

    http://www.thexlab.com/faqs/performance.html

    http://www.thexlab.com/faqs/sbbod.html

     

    Have you tried the Chrome browser from https://www.google.com/chrome?platform=mac ? It operates a little differently than others.

  • 4. Re: Web browser leakage uses up almost all memory
    dymar Level 1 Level 1 (0 points)

    <<< While the web browsers may be contributing to memory usage, I'm not sure I'd conclude that's what's killing performance. >>>

     

    Thanks.  I'll check out those xlab links, but I thought this was a rather well-known problem, particularly with Firefox.

     

    I am always seeing comments posted on the web such as the following one (that I just ran across today):

     

    <<< Wouldn't having thousands of bookmarks saved in FF slow it down even more? I'm already thinking of kicking that fox to the curb for snagging up to 102% [per Activity Monitor on my Mac] of CPU. Sneaky like a fox too in that it used to make my fans go crazy long before it got out of hand. Now I only know when scrolling, opening tabs, etc. slows to a crawl. >>>

     

    I've tried Chrome and use it sometimes.  I've found it to be incredibly slow a lot of the time.

     

    I have plenty of free disk space.  It ain't that.

  • 5. Re: Web browser leakage uses up almost all memory
    kostby Level 4 Level 4 (2,370 points)

    Which release of Safari are you using? Your original profile suggests you are still on OS X 10.6.3

     

    The most recent release of Safari (5.1.7) for OS X 10.6.8 seems to keep more free RAM available (and thus offers a bit better performance with fewer beachballs) than Safari 5.0.5, the version I used extensively before recently updating to OS X 10.6.8 to get the anti-Flashback security updates.

  • 6. Re: Web browser leakage uses up almost all memory
    dymar Level 1 Level 1 (0 points)

    <<< Which release of Safari are you using? Your original profile suggests you are still on OS X 10.6.3

     

    The most recent release of Safari (5.1.7) for OS X 10.6.8 seems to keep more free RAM available (and thus offers a bit better performance with fewer beachballs) than Safari 5.0.5, the version I used extensively before recently updating to OS X 10.6.8 to get the anti-Flashback security updates. >>>

     

    I'm actually using OS 10.6.7 (not 10.6.3).  I'll update to 10.6.8 now that you've made me aware of it (thanks), but I don't see why that will make any difference regarding this particular problem.

     

    I'll also update Safari (I'm back a few revisions on that one), but there too, I don't expect any pleasant surprises.  (I don't recall ever seeing a performance improvement from an update.)

     

    My inquiry was primarily directed at the use of the Firefox browser.  However, when I've switched (in frustration) to Safari, I've seen negligible difference in performance, or regarding the particular issues I've posted about.

     

    Even you characterized the performance gain as "a bit better."  This problem cries out for much more than "a bit."

     

    Thanks for your reply.

  • 7. Re: Web browser leakage uses up almost all memory
    kostby Level 4 Level 4 (2,370 points)

    We're all users here. If you want to provide Apple with the specifics of your issue, send feedback to Apple here:

    http://www.apple.com/feedback/

     

    I absolutely don't speak for Apple, but from my perspective (as user of a mid-2007 MacBook, and thus a 5-year-observer) expecting anything more than 'a bit' of performance improvement on a 2006(?) 1.83Ghz MacBook is a complete waste of time. It just isn't going to happen. OS X 10.8 Mountain Lion has already been announced. Newer/faster/better computing devices are always on the drawing board.

     

    Apple is unlikely to fix any further Snow Leopard issues except for future widely-reported vulnerabilities (like the recent Flashback malware) that actively affect hundreds of thousands of users. Why will they not 'fix' Snow Leopard and/or Safari memory leaks? Short answer: There isn't enough money in it. It is far more profitable for Apple to convince many customers (but obviously, not 'everyone') to buy new systems.

     

    Maybe a downgrade to Tiger or Leopard could provide the additional performance you seek, at the risk of security vulnerabilities that will never be patched.

  • 8. Re: Web browser leakage uses up almost all memory
    dymar Level 1 Level 1 (0 points)

    First, just to clarify my earlier comment about Chrome, I had previously used it only simultaneously with Firefox (mainly to have Flash available, when needed).  Maybe that's why its performance was so degraded.  Using it on its own I see (at least so far) that it's much more responsive.  If I'm lucky, maybe I won't experience the performance issues (and endless crashes) I've had with Firefox (8.0.1) with Chrome.

     

    The profitability issue you mention is one of the major downsides of modern technology.  The unwillingness of Apple (and other tech companies) to allocate resources for the portion of its user base that sees no need, and/or has no inclination, to continuously race down an imposed upgrade path, is a sore spot for Apple (and others), even if it intentionally chooses to ignore it.  It certainly inspires no love or loyalty in me.  Whereas, Apple's going the extra mile, and finding ways to accommodate those users, would.

     

    I couldn't consider downgrading from Snow Leopard.  Part of the reason I upgraded from Tiger in the first place was because more and more software was no longer being developed for Tiger.

     

    Thanks for your reply.