How is a web browser being allowed to use 800MB of RAM good RAM management?

Discussion in 'macOS' started by Burnsey, Jan 24, 2012.

  1. Burnsey macrumors 6502a

    Joined:
    Jul 1, 2007
    Location:
    Canada
    #1
    I only have 2GB of RAM in my MBP (don't laugh) and a single web browser like FireFox can cripple everything by using almost half of the available RAM over a day of usage. This is pissing me off to no end because every action I input into the computer is met with the god awful sound of the disk grinding and that infuriating beachball. Why doesn't FireFox or any other browser simply take the crap in RAM and dump it after I've closed the window? I can close every FireFox window and the thing is still using over 800MB of RAM! It gets so bad that FireFox itself will become very sluggish. The only way to clear up the RAM is to quit the browser. How is this smart RAM management?

    Why can't I manually LIMIT the amount of RAM an application is allowed to use? OSX clearly can't seem to figure it out.

    Sorry for the rant but I'm sick of this.
     
  2. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #2
    You're blaming Firefox's excessive ram usage on poor memory management by OS X? The correct thing to blame is Firefox's memory leaks and poorly coded memory management. OS X is doing its job correctly by putting unused portions of ram into swap on the disk.
     
  3. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #3
    That's your first problem. Many apps require significant amounts of memory. Mac OS X manages RAM quite well, without user interference. If your regular workload requires more RAM, buy more RAM. It's as simple as that.

    To determine if you can benefit from more RAM, launch Activity Monitor and click the System Memory tab at the bottom to check your page outs. Page outs are cumulative since your last restart, so the best way to check is to restart your computer and track page outs under your normal workload (the apps, browser pages and documents you normally would have open). If your page outs are significant (say 1GB or more) under normal use, you may benefit from more RAM.

    Mac OS X: Reading system memory usage in Activity Monitor

    For Flash issues:
     
  4. Burnsey thread starter macrumors 6502a

    Joined:
    Jul 1, 2007
    Location:
    Canada
    #4
    I switched to FireFox from Safari because Safari was even worse. After a day's worth of usage with all windows closed and a clean desktop, Safari would be using 1.2GB of RAM.

    OSX should not let an application consume all the available RAM to the point that it cripples the entire system and the application itself. At the very least I should be given an option to limit the RAM certain applications use.

    Most of the RAM "used" is also blue (inactive). Why is OSX not smart enough to more actively clear up the inactive RAM such that it doesn't affect the performance of the system?
     
  5. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #5
    Read the first link I posted so you'll better understand what inactive RAM is and how it's managed. Inactive RAM doesn't need to be "cleared up".
     
  6. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #6
    I must concur with GGJstudios on this one. Part of your problem is having only 2Gb of ram. If OS X didn't allow a program to use all available ram, then there would be many more problems. Like the problems that plagued Mac OS 7-9.2.2 and all of the "Out of memory" errors.

    Blue ram, also called inactive, is treated as ram that can be freed for use by other programs. It is not freed until needed, because if a program needs the same ram contents back, it is made active again instead of reprocessing that data. Remember, on modern UNIX based systems, free ram is wasted ram.
     
  7. Burnsey thread starter macrumors 6502a

    Joined:
    Jul 1, 2007
    Location:
    Canada
    #7
    Yes I've heard about this. However it seems to me like one of those "in theory" things. Whenever I have little to no "green" available RAM, even if most of the RAM is "blue" inactive RAM, the system becomes sluggish. Once I quit an application such as FireFox that is causing all the inactive RAM, I get a chunk of "green" active RAM back and the system performs smoothly afterwards. Performance is at its worst when all of the available "green" RAM was just consumed, even if there is tons of inactive RAM that the system could clear up for use.

    There have been many times when I've been forced to quit an application to free up "green" available RAM to improve performance (and it does significantly improve performance), even when other applications like FireFox are still consuming gobs of "blue" inactive RAM.
     
  8. Burnsey thread starter macrumors 6502a

    Joined:
    Jul 1, 2007
    Location:
    Canada
    #8
    Lol this is so bad that my iTunes song actually starts skipping as soon as I run out of the green RAM and open a new app, even if there is a chunk of blue ram available.

    Fail.
     
  9. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #9
    The root cause here isn't the machine, it's the user. You are forcing your machine to run on an outdated amount of ram. Stop being cheap and upgrade it. What you're doing it making a Ford Range try to pull a fully loaded 53' trailer up a hill. It just won't go.

    Fail on your part.
     
  10. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #10
    First of all, it's not "green RAM" or "blue RAM". It's free or inactive memory. As already stated, both are available for apps to use, as needed. There are many things that impact performance beyond available memory, such as Flash content on websites and high CPU utilization. Increase your RAM to 4GB, then forget about RAM and let Mac OS X manage memory, as it knows how to do without your interference.

    Performance Tips For Mac OS X
     
  11. Burnsey thread starter macrumors 6502a

    Joined:
    Jul 1, 2007
    Location:
    Canada
    #11
    My most demanding application on this machine is a web browser. It is essentially a netbook, 2GB of RAM should be more than enough to run a web browser. Apparently Mozilla thinks otherwise.

    I'm 100% sure it's the RAM, because everytime the system slows, it's because all the active ram has been used up and the HD is grinding away.

    I wish every RAM was active RAM, inactive RAM is stupid IMO.
     
  12. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #12
    Because you don't understand what inactive memory is or how it works doesn't make it stupid. It actually improves performance, but you'd have to be willing to read and learn to understand that.
     
  13. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #13
    Once again, reiterating the original post, this problem isn't caused by OS X. It is caused by FireFox. Try using another browser like Safari or Chrome. You'll likely see a great improvement.
     
  14. thekev macrumors 604

    thekev

    Joined:
    Aug 5, 2010
    #14
    Grinding away as in disk thrashing? In that case your problem extends beyond ram. Are you running on Lion? If so go back to SL. The reality is that ram consumption goes up over time. At one point 64 MB could handle your web browsing needs. Also look into another browser under OSX.

    I didn't know it had so many memory leaking issues, but the OP seems to have a compounded problem. He's hitting a wall on ram and experiencing disk thrashing.
     
  15. Mr. Retrofire macrumors 601

    Mr. Retrofire

    Joined:
    Mar 2, 2010
    Location:
    www.emiliana.cl/en
    #15
    You must not, but you do.
    I had never an "out of memory" error (Error #-108) on Mac OS 8.6 - 9.2.2 with Mozilla (non-Firefox) and IE 5.x.x, even with QuickTime v6.x.x and Flash/Shockwave-plugins enabled. Btw, Mac OS 9.2.2 with 384 MB RAM. Why not? Simple: Mac OS 8.6 - 9.2.2 uses virtual memory, if necessary.
     
  16. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #16
    Then you must have never used 7.5.5 on a Mac with only a 100Mb hard drive. Even on my Cube with 1.5Gb of ram and 9.2.2, Photoshop gets this error. These errors stem from how classic Mac allocates its memory. Each program is given a set amount of ram when it loads. This amount is changeable in the properties for the program in question. Most developers allocate what they believe is a good amount for their program.

    Some times the program may need more ram then it's allocated. Example, if I'm editing a 20Mb photo with multiple layers in Photoshop in Mac OS 9.2.2 on a Mac that has 1Gb of ram and Photoshop is allocated 100Mb by the system. If I was to try to open that same image 5 times, Photoshop would then declare that it is out of memory, because it is out of its allocated memory. I'd then have to close Photoshop and increase its allocated memory amount.

    Mac OS X doesn't suffer from this problem and instead uses dynamic ram allocation and deallocation. Virtual memory, while good in for somethings, cannot dynamically increase a classic Mac program's memory amount. It can only store portions of the application heap on the hard drive.
     

Share This Page