Why am I always running out of RAM?

For a pair of weeks now I have been doing all I am capable to understand the problem I have been experiencing. The language and terminology if my issue is somewhat foreign to me, but here is my best explanation.

On my Mac Pro 8-core 2.8 GHz tower with 8 GB of RAM I am finding myself running very few operations but end up in a situation where I can visibly see my performance bogging down as if I am out of RAM.

So I have been running activity monitor and what I am seeing is 40 MB of "Free" RAM with 630 MB "Wired", 2.5 GB "Inactive" and about 5 GB of "Active".

I understand some of the basics of what these terms mean. Here is one thing I am 100% certain: after a reboot I start with a massive majority of "Free" or "Green Colored Pie Section" of RAM and when this is happening, my performance is fantastic. Whenever I have a few GB's of RAM, I never complain about my performance.

Here is something I am almost 100% certain of: when my performance is poor or lacking, I notice two things that I find alarming: 1) I have under 100MB of "Free" RAM and 2) 50-60% of the RAM pie is colored yellow indicating "Active".

I am using very common applications and even when I quit all of my applications (except activity monitor) the active RAM is still dominating my 'pie'.

That's the best I can do for now, any help is appreciated.

Thanks,

Jeff

Mac OS X (10.6.1)

Posted on Oct 28, 2009 3:44 PM

Reply
23 replies

Oct 28, 2009 3:52 PM in response to JeffKasper

[This read (especially email 2)|http://www.macosxhints.com/article.php?story=20010613140025184], while a little dated, should help you better understand what is happening with your RAM. What's happening may not be bad unless you are confident that you are having performance degradation. And, if you are, then the read may explain why. And, [here is another good read|http://developer.apple.com/mac/library/documentation/Performance/Conceptua l/ManagingMemory/Articles/AboutMemory.html] on memory.

Oct 28, 2009 4:09 PM in response to JeffKasper

JeffKasper wrote:
. . .
So I have been running activity monitor and what I am seeing is 40 MB of "Free" RAM with 630 MB "Wired", 2.5 GB "Inactive" and about 5 GB of "Active".


Both "Free" and "Inactive" are (supposed to be) available for use by any process that wants it.

When you first start up, most memory is, of course, "Free." As apps or system processes need memory, that's where OSX gets it. When they release it, however, it does not go back to Free, but to "Inactive" and is identified with the last process that used it. This is done to speed up assigning it back to the previous process if it requests it (which of course is quite common).

So as time passes, you'll see less and less Free memory and more and more Inactive memory; this means your Mac is working properly. In fact, after running for a long time, if there's much Free memory left, it is, in a sense, wasted!

The thing to watch for is Paging. If the "Page outs" figure is high, or changing rapidly, then OSX is having to page stuff out because it's out of both Free and Inactive memory.

A better way to monitor page-outs is via a Terminal command. (The Terminal app is in your Applications/Utilities folder.) Enter the following, exactly as shown, at the prompt:

sar -g 60 10

Leave the terminal window open, then try to re-create the unresponsive problem.

This should tell you if you are doing pageouts. You'll see a line in the Terminal window every 60 seconds for 10 minutes (or until you quit Terminal), showing the number of pageouts per second. A few pageouts is normal. If you have large numbers of pageouts, then you have a memory problem.

Oct 28, 2009 4:11 PM in response to V.K.

I know it doesn't add it to anywhere close to my 8 GB. What I am seeing that troubles me is the 5 GB of "Active" RAM. As far as I know and I am fairly certain of this, no torrent programs have been run on this machine, certainly not with my knowledge and doubtful of the one other person that has access to this machine.

I will check out memtest shortly.

Oct 28, 2009 4:14 PM in response to JeffKasper

So how many pageouts?

When you Go to Folder: /var/vm how many and large are the swap files?

Take it you've said no heavy work or large files in graphics or running CS4 and Illustrator?

I'd test your memory and keep your eye out. And how fragmented your free space and "crowded" your boot drive is. A fast boot drive helps if you are paging.

I've seen Safari chew up 800MB with multiple windows, each window with 10 or more tabs.

Was this article mentioned on using Activity Monitor?
http://support.apple.com/kb/HT1342

When I've downloaded 3GB files, they have stayed in cached memory for some reason; or opening 2GB files.

Would be fun and interesting just to see what happens with 4GB on your system, or 6GB. And to run AHT (Apple Hardware Test).

Are you only looking at USER processes, and filtering what is shown in Activity Monitor? there should be kernel task and others, windows manager, taking up 1GB.

Oct 28, 2009 4:19 PM in response to Pondini

I didn't finish reading this entire post because I wanted to jump in.

you said: "When they release it, however, it does not go back to Free, but to "Inactive" and is identified with the last process that used it"

Here's my question, when I close one of the two apps I have running, I can see my "Free" RAM jump in an amount roughly the size of the RAM it was using- by your sentence above, I would see that as being contradictory. Help me to understand this?

Also, why is it when I close all of my applications except for Activity Monitor, I still have over 4.5 GB of Active RAM.

Oct 28, 2009 4:25 PM in response to JeffKasper

JeffKasper wrote:
I didn't finish reading this entire post because I wanted to jump in.

you said: "When they release it, however, it does not go back to Free, but to "Inactive" and is identified with the last process that used it"

Here's my question, when I close one of the two apps I have running, I can see my "Free" RAM jump in an amount roughly the size of the RAM it was using- by your sentence above, I would see that as being contradictory. Help me to understand this?


My understanding is, quitting an app entirely is treated differently than an app releasing some of it's memory. Think of Mail, for example, wanting to check for new mail every 5 or 10 minutes, or however it's set, but being idle the rest of the time.

And it appears that some apps or processes are treated differently, too, but I don't know enough of the nitty-gritty to be sure.

And of course if there's an app (or process) with a memory leak, it can consume all sorts of memory.

Oct 28, 2009 4:46 PM in response to The hatter

And, as the hatter says, checking on swap file size and quantity is a 3rd indicator. Still, it's a bit hard to know when there is too much of a good thing. Putting all three together though--perceived performance degradation, a seemingly large number of MBs of swapfiles, and a seemingly large number of pageouts--gives an even better indicator of short on RAMness.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Why am I always running out of RAM?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.