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

Burnsey

macrumors 6502a
Original poster
Jul 1, 2007
572
67
Canada
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.
 

Intell

macrumors P6
Jan 24, 2010
18,900
415
Inside
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.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,436
800
I only have 2GB of RAM in my MBP .
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:
 

Burnsey

macrumors 6502a
Original poster
Jul 1, 2007
572
67
Canada
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.
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?
 

GGJstudios

macrumors Westmere
May 16, 2008
44,436
800
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?
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".
 

Intell

macrumors P6
Jan 24, 2010
18,900
415
Inside
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.
 

Burnsey

macrumors 6502a
Original poster
Jul 1, 2007
572
67
Canada
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.
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.
 

Burnsey

macrumors 6502a
Original poster
Jul 1, 2007
572
67
Canada
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.
 

Intell

macrumors P6
Jan 24, 2010
18,900
415
Inside
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.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,436
800
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.
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
 

Burnsey

macrumors 6502a
Original poster
Jul 1, 2007
572
67
Canada
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.
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.

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
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.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,436
800
I wish every RAM was active RAM, inactive RAM is stupid IMO.
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.
 

Intell

macrumors P6
Jan 24, 2010
18,900
415
Inside
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.
 

thekev

macrumors 604
Aug 5, 2010
6,823
2,292
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.
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.

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.
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.
 

Mr. Retrofire

macrumors 603
Mar 2, 2010
5,039
470
www.emiliana.cl/en
I must concur with GGJstudios on this one.
You must not, but you do.
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.
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.
 

Intell

macrumors P6
Jan 24, 2010
18,900
415
Inside
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.
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.