What exactly is 'inactive memory' and what is reserving it.

Discussion in 'Macintosh Computers' started by dogbone, Sep 23, 2005.

  1. macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #1
    Looking at my acivity monitor I have shut everything down and except for safari and the activity monitor.

    I can see that all the items listed in the monitor add up to about 260Mb of real memory.

    There is 100Mb Wired, I suppose that has to do with the net.

    There's 266Mb Active I suppose that is all the things i can see in the monitor.

    There's 790Mb Inactive Don't have the slightest clue what that is all about but it goes a long way to explaining why I only have about 420Mb free.

    What is that huge chunk of Inactive memory and what does it mean for example if I want to open a bunch of large Photoshop files. Does that Inactive memory rob Photoshop of Ram it could use?

    Can anyone point me towards an article that explains exactly how OSX and G4's use ram. It used to be so clear with OS9.

    So at the moment even though I've not got anything open I'm using over a gig of ram.

    Say I wanted to do some heavy duty work with Photoshop would I be better off restarting first or would that have no effect.
     
  2. macrumors 6502

    Joined:
    Mar 15, 2005
    Location:
    The heart of Europe
    #2
    Nono, OS X will take care of assigning RAM to the app which needs it. This was not the case with OS9.

    You might want to read John Siracusa on the topic:
    http://arstechnica.com/reviews/os/macosx-10.1.ars/7

    It's not new but the principle is still valid.
     
  3. macrumors G4

    Applespider

    Joined:
    Jan 20, 2004
    Location:
    looking through rose-tinted spectacles...
    #3
    If you had Photoshop open and then you quit it, the memory that it had been using will show up in inactive memory.

    If you decide to open Dreamweaver and need to use that memory, OS X will take the inactive memory and allocate it to new applications.

    But, very cleverly, if you happen to open Photoshop again while its inactive memory is still there (simplistically speaking), OS X will be able to load it faster since bits of it are still in memory.

    Don't worry about not having free memory; any large amount of free memory is wasted since it's not doing anything. Let OSX work out how to handle it; it does a pretty good job. It's only if your pageins/pageouts number gets excessively high in a short period of time that you know you need more memory.
     
  4. thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #4
    Thanks lexfuzo, I'll have a read of that.

    Appleinsider, ah yes I think I get it now. So I can consider 'inactive memory' effectively as 'free ram'.

    What is this page in page out number. (I haven't read the article yet so it might be in there) at the moment it's 38000/0 what would be considered excessively high. I'll go read the article now.
     
  5. macrumors 6502

    Joined:
    Mar 15, 2005
    Location:
    The heart of Europe
    #5
    PageIn and -Out refer to parts of memory that are written to disk (swap space) from RAM or read from swap into RAM again. The OS tries to do this as little as possible. The numbers accumulate over time. What's your uptime? The fact that PageOut is zero is a good sign mthat your RAM is sufficient.
     
  6. macrumors regular

    Joined:
    Feb 18, 2003
    Location:
    Denver
    #6
    I'd like to second dogbone's question. What is a decent pagein page out ratio to uptime?
     
  7. macrumors newbie

    Joined:
    Jan 31, 2004
    #7
    What would be an ideal ratio?
     
  8. macrumors 6502

    Joined:
    Mar 15, 2005
    Location:
    The heart of Europe
    #8
    I don't know how this should be expressed in numbers. It depends not only on uptime, but on the activity as well.
    Two rules-of-thumb would be:
    1) the lower the better - anything with 5 digits for some days of use is quite right
    2) As long as you don't experience the following, you're good with RAM:
    An app performs something which doesn't need high disk-I/O (such as opening a menu) and is very slow at that while the HD is grinding. This means that the OS has to PageIn that the app can allocate the memory for the menu. When this happens at a usual amount of simultaneous activities on your machine, you should get more RAM.
     
  9. macrumors regular

    Joined:
    Feb 18, 2003
    Location:
    Denver
    #9
    Thanks for your response. I have noticed pagein and pageout on my stats monitor, but I had no idea what that was and I have not given it much thought.

    I have not experienced that issues you stated in point number 2, so I bet I have enough RAM for my needs.

    (post 100 after 2.5 years!)
     
  10. macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #10
    Ideally for page ins/outs, you will see zero outs--that means the OS has never needed to swap *anything* to disk. Non zero isn't necessarily a big deal--the data being swapped may have been something very unimportant from a RAM-hungry app that doesn't really use all of it--but zero is ideal.

    The number of ins, so far as I understand it, isn't important, since that's just the number of pages an app needed to load into memory. It will, by definition, go up every time you launch an app you didn't have open before, since that app of course needs to load stuff. Generally it *won't* go up by much the 2nd time you open an app, thanks to that handy "inactive" RAM--the data it needs is already sitting in RAM, and so doesn't need to be paged in.

    Now, if the system is paging a bunch of stuff out to disk then loading it back in, both numbers are going to go up at a frightening pace, and that's when your system slows down--on a smoothly running system the page ins shouldn't change much when you're not opening apps (or using an app's feature for the first time, so it has to load it), while on a system that's thrashing, it'll be cranking up constantly.
     

Share This Page