Inactive memory

matchbox

Registered
When I look at the System Memory in the Activity Monitor, I see that
often a few hundred megabytes out of a total of 1 GB are in an
"inactive" for the RAM on my iMac G4, running Panther. What does
this mean? The amount of inactive memory grows as I open applications
until at times its half of the total RAM. I am curious because it seems that
my machine has been getting slower and slower in doing simple things
such as switching between the virtual windows of Codetek.
 
My limited understanding is that: memory pulled into use by a system service or app, but not active at this moment, will be inactive. As I understand it, the most efficient use of system memory with Unix is when there is a relatively limited amount of free (unused) memory, and most of the memory is in use. Not all of the memory will be Active, so memory in use that is not presently Active, must be Inactive. Again, Inactive memory will be used by any other app or service that demands it. Inactive memory will tend to be the largest portion, unless an app demands it. If more memory is required, then this is where Free memory comes in!
Anyone ever watch Activity Monitor when PhotoShop (or another app that has large demands on memory) is working hard?
 
This is from our In-House Perfessor101;

Perhaps this will help you understand OS X memory usage a little better:
  • all memory in OS X is "virtual". Some of that virtual memory is in RAM, some in system and application files on the hard drive, and some may be in swapfiles
  • Wired RAM is memory that is pernamently "locked" by the OS and cannot be made inactive or moved to swapfiles. It must be there for the operation of the OS
  • Active RAM is memory that is currently in use by either the system or an application.
  • Inactive RAM may be thought of as a first stage swapfile. It contains instructions and data that are not currently in use within the OS or an application, but is left in RAM in the event it is needed again. If more Active RAM is needed, the Inactive RAM will be reassigned and if it contains data for a currently open application, that data will be rolled out to a swapfile. Otherwise the memory will simply be overwritten.
  • Free RAM is just that. It is RAM that is currently not mapped into Wired, Active, or Inactive RAM. If more Active RAM is needed, the Free RAM will be the first to be remapped into Active status.
  • Swapfiles are used to contain data being used by currently open applications for which there is currently no room in either Active or Inactive RAM
  • System resources, fonts, application files, frameworks (shared libraries) are mapped into the virtual memory address space for each application whether they are in Wired, RAM Active RAM, Inactive, RAM, or in files on the HD, but these resources are never placed in the swapfile(s) because they are already available on the hard drive and there is no point in duplicating the code.
  • Pageins occur anytime something is moved into Active RAM whether that is from Inactive RAM, the swapfile(s), or another file on the hard drive.
  • Pagouts occur anytime anything is moved out of Active RAM which includes mapping into Inactive RAM, as well as writing to a Swapfile. Only data is ever written to the hard drive since instructions are already on the hard drive.
All in all this is a very efficient use of memory. It also has the benefit of providing an almost invulnerable wall protecting the operating system and each application from inadvertent intrusion by ill behaving code. This is one of the "secrets" of OS X stability.
 
After reading the informative previous post on memory usage, let me ask
this simple question: is ~400 MB a reasonable amount of "real memory"
for Safari to be using? I have one window open with 6 tabs of Safari
if that makes a difference. Still trying to figure out why my machine
has become slower to do simple tasks such as scrolling down a page
of text in Safari, which sometimes brings up the dreaded spinning ball.
 
Sometimes what gets me is that after having applications open for awhile doing quite alot of work each, the amount of ram that is free (in activity monitor) doesnt decrease. Another thing is, is how slow the flash plugin is in safari, it really slows down the whole system... pretty annoying. Yet compare it to firefox, the flash plugin is way faster than safari and i think safari tends to use more of the cpu than firefox.... ??
 
Back
Top