Used Memory on Intel Mac OS X

Discussion in 'macOS' started by ptrael, Jun 12, 2007.

  1. ptrael macrumors newbie

    Joined:
    Jun 19, 2006
    #1
    I've noticed some strange memory consumption on Intel Macs, compared to PPC Macs. I thought that my Mac mini (1GB RAM) at work was only affected, but when I replaced my PowerBook G4 (640MB RAM) with a MacBook (1GB RAM) I also noticed this behaviour.

    Basically it appears as though half of the memory is not being used properly, as evidenced by the screenshot of Activity Monitor. Usually there is ~10MB of free memory, a virtual machine in Parallels was just shut down in the screenshot. I actually experience a performance hit when running less applications than I did on the PowerBook, which had closer to half the memory of the MacBook.

    Is this expected behaviour? The private memory looks correct, but iterating through the memory output of /bin/ps adds up to nowhere near 1GB.
     

    Attached Files:

  2. iBookG4user macrumors 604

    iBookG4user

    Joined:
    Jun 27, 2006
    Location:
    Seattle, WA
    #2
    I see that you're using parallels, if you had been using that earlier, then it would essentially give you half of that memory. I assume that's why you are seeing so many page outs, I would suggest upping the RAM to 2GB if you are using parallels.
     
  3. ptrael thread starter macrumors newbie

    Joined:
    Jun 19, 2006
    #3
    2GB would be nice. What can explain the disparity with the total memory usage and the usage in the columns?
     
  4. iBookG4user macrumors 604

    iBookG4user

    Joined:
    Jun 27, 2006
    Location:
    Seattle, WA
    #4
    Wired memory is explained here, Active memory is the memory that is being used right now, that's what you're seeing in the activity monitor, and inactive memory is memory that has been used and it still in RAM, so that it will be faster if you ever use it again. And 2GB of RAM is dirt cheap now, I have these in my MacBook Pro and they work great.
     
  5. ptrael thread starter macrumors newbie

    Joined:
    Jun 19, 2006
    #5
    So theoretically what should all the real memory in the columns add up to? I thought that the used (wired + inactive + active) would add up to the sum of the columns.

    There has been such a large difference in the memory consumption of the PowerBook and the MacBook. Almost always there will be ~10MB free memory on the MacBook/mini, which isn't necessarily a bad thing, but there is such poor performance sometimes, sometimes often. Applications with a sum of about 400MB real memory.
     
  6. iBookG4user macrumors 604

    iBookG4user

    Joined:
    Jun 27, 2006
    Location:
    Seattle, WA
    #6
    I don't believe that wired and inactive are counted in the columns, so it would only be active memory that in the columns. Once you get down to ~10MB free, then you should upgrade the RAM. When you see the applications getting slow, that's when the hard disk is being used, because there is no more RAM available, and the hard disk is significantly slower than RAM.
     
  7. Michael Smith macrumors newbie

    Joined:
    Jun 13, 2007
    #7
    It won't add up to anything in particular.

    The "real" memory number for a process is an attempt to describe how much of the virtual space in its task is backed by physical pages. There are several factors that complicate this accounting, most particularly that physical pages can be present in more than one task simultaneously.

    Without more details on your part, I can't work out what you mean by "not being used correctly". There's nothing particularly untoward in your Activity Monitor screenshot; it looks like you just quit something with a large amount of private memory that's been dumped into the freelist, but while you were running it you were pretty tight on memory (hence the high pageout count).

    = Mike
     
  8. miniConvert macrumors 68040

    miniConvert

    Joined:
    Mar 4, 2006
    Location:
    Kent, UK - the 'Garden of England'.
    #8
    No, because inactive memory isn't going to show up in any of the columns - because it's inactive, ie not being used by anything at the moment. Deduct inactive memory from your calculation and you might get a number that's more accurate.
     
  9. Michael Smith macrumors newbie

    Joined:
    Jun 13, 2007
    #9
    This is not correct. Memory accounted as 'real' can be in any state (other than 'free').

    The two queues are part of the traditional Mach LRU page replacement algorithm. You can read more about it in Amit Singh's book, or in any decent Operating Systems textbook.

    = Mike
     
  10. ptrael thread starter macrumors newbie

    Joined:
    Jun 19, 2006
    #10
    Thanks for the responses Mike. I've attached an image of typical usage. The sum of the real column came to 742.38 MB.

    How different is the memory management with the Intel version of Mac OS X? It seems to handle memory very differently, the Leopard beta memory requirements are double for Intel-based Macs.
     

    Attached Files:

Share This Page