Where is my RAM going?

josh3dmaker

Registered
OK, I have a dual 500 mhz G4 tower with 512megs of RAM.

Lately I noticed that my computer has been running more slowly than usual, and so I have been trying to find out what the cause might be.

While looking at the amount of RAM my computer was using with the shareware program "memory usage getter" I read that I was using about 250 megs of RAM - and the only programs I was running were the finder and memory usage getter! I then added up the amount of RAM that each application and process was taking up, as listed in memory usage getter, but that accounted for only about 70 megs the RAM I was using.

I then quit memory usage getter and loaded up the terminal to run "top". one of the lines it printed out was:
PhysMem: 47.8M wired, 66.1M active, 135M inactive, 249M used, 263M free

What is using all of my RAM and how can I get it back?

HELP!

Josh
 
You're thinking slightly in the wrong paradigm for Mac OS X. :)

Mac OS X is based on a BSD core, which in turn is based on UNIX ideas. One of these ideas is that rather than attempting to allocate RAM as applications request it, we grab a bunch and cache it. This way, RAM is already ready and waiting to be used when the OS needs to allocate a chunk of RAM to a program.

This is perfectly normal behaviour for this type of operating system and will not slow down your computing experience -- to the contrary, it works to make the system faster. The slowdown is the result of something else, most likely something hogging CPU time.

So, to answer your questions: There is nothing using all your RAM, and no way to "get the memory back", because it's being utilized normally.

Check top to see if anything's using excessive amounts of CPU time, try running MacJanitor to force maintenance tasks to run... Something else is the culprit here.
 
Colin's analysis of the situation is right on target. But if you have an obsession with having some RAM free, there is a "trick" that will help. Run the weekly clean-up routine, either with MacJanitor or by typing "sudo sh /etc/weekly" (minus the quotes) in a Terminal window. This will free up a chunk of RAM as the system updates its databases.
 
You really don't want to free up that ram, because it will be freed up when needed. The ram listed as inactive, is basically cached ram that was freed. If you've noticed, most os x apps start faster the second time you've run them, this is because the core of the program was never actually freed from memory, and the os remembered the pointers to it. Actually zeroing out memory when it's 'freed' from an application is wasteful. The OS will start zeroing out the memory in the inactive state when it runs out of free memory. This is one of the reasons why having a large amount of memory is exremely helpful in speeding up os x. This is one of the things that makes OS X so great, it's memory management just rocks.

Brian
 
Also, in UNIX top, the memory is mesured in megabits and kilobits, not megabytes and kilobytes. Don't ask why... lol :D
 
josh3dmaker:

You said you were using Memory Usage Getter (see my sig). :)

Just a tip: if you are using Memory Usage Getter 2.0.2, you might want to check the documentation included with the program. You can either press Command-? when running the program, or you can go to http://homepage.mac.com/simx/mughelp/ .

Particularly, you should check out the "Overview of Memory Usage" section, and you should also check out the "Frequently Asked Questions" section, because it deals exactly with your question. What everyone has said in this forum is correct, but I provided a really detailed look at memory usage, and the specific FAQ takes a look at your observation, as well.

I thought it might help since you were already using my program. :)
 
Back
Top