RMBP has lots of page outs even with 16GBs of RAM

Discussion in 'MacBook Pro' started by RiseDarthVader, Dec 1, 2012.

  1. macrumors member

    Aug 5, 2012
    So I've got 16GBs of RAM in my MacBook Pro with retina display so how come it's still paging out when I'm doing video editing in FCP or using other "pro" applications?
    I've included screenshots that show I've got over 10GBs of inactive RAM so why isn't that being utilised?
  2. macrumors 604


    Jun 27, 2006
    Seattle, WA
    Did you close any apps before taking the screenshot? The page outs are cumulative, so they didn't necessarily happen recently, they could've happened any time since you last restarted your computer. If you have applications open that have used large amounts of RAM, it'll keep that RAM inactive in case it needs it again. If you quit the apps that hold the inactive RAM it'll release the RAM into free memory.
  3. macrumors regular

    Jun 15, 2007
    Try opening the terminal window (in Utilities) and then type in "purge" (without the quotes), then hit enter. That will free up memory.
  4. macrumors 603


    Aug 5, 2010
    Lion and Mountain Lion suck at memory management. Inactive memory should be freed up, but this doesn't always seem to happen. I liked Snow Leopard better. Unfortunately it won't gain support for any new hardware features:(.
  5. macrumors 6502

    Jan 3, 2008
    I kinda freaked out before realizing that page outs were cumulative... I checked my Activity Monitor and had a couple GBs of it and couldn't figure out why! lol
  6. macrumors 68040


    Dec 5, 2009
    A very simple rule is that if page outs aren't significantly higher than the swap used, they really don't matter. Whatever data it is, it was store away for a while and there is no need for it.

    Page outs are a problem if they are a multiple of swap used or in case the system has been running a long time the ratio between page outs vs page ins. Because if it means data has been paged back in and out again and again. That slows down performance. If it is only swaped out once and never back it is probably just uselessly allocated space that has little to no use. It is more fixing bad memory behavior from applications than anything else.
    If out/in is 10% or lower there is no need for any more RAM. Some used to say only at 20% and higher more RAM starts being justified. There will always be a little of swap and paging unless you have almost double the memory that you actually need. With an SSD you need even less RAM because paging in is so fast that most people never notice. It is one thing to run out of RAM with one very memory heavy app. It is another if you just have lots of apps running but most in the background. An app on the third space can be swapped back in almost the time it takes to switch to it (from an SSD). The same is with tabs in a browser. You have 40 open but not all need to be in RAM as swapping from an SSD is not much slower than the rendering itself.

    The op didn't have it running too long as the page ins are relatively low. I got 166 GB page-in 12 days uptime. And 11 out with 2.5 GB swap. Perfectly enough RAM. The only page outs I have is useless data I am not using anyway which gets pushed out once the space is actually needed.
    I have pushed the limits and paging that actually impacts performance looks a lot different.
  7. thread starter macrumors member

    Aug 5, 2012
  8. jhu2, Dec 4, 2012
    Last edited: Dec 4, 2012

    macrumors member

    Nov 6, 2007
    for some reason, on my 8 gb rmbp i had around 8gbs of page ins and 10 gbs of page outs. I don't use any pro programs, no photo editing, no vm's...

    anyone have any idea as to why my machine is paging out so much? I'm pretty much just running safari, mplayer, mail, and adium.... I barely had an page outs after weeks of up time on my mid 2010 macbook pro with 4gb and im pretty much doing the same thing son my rMBP as my uMBP
  9. macrumors 68040


    Dec 5, 2009
    Sounds like a program with a memory leak. It is similar to what some people reporting lots of modified ram use in Windows.
    If that is all you are running I would guess it is Safari. If you open lots of tabs or if one has a leak in some JS code.
    You'd have to print a screen of activity monitor sorted by ram use.
  10. macrumors member

    Nov 6, 2007
    Yeah, I've noticed that when I quit safari, it frees up around 2-3 gigs worth of ram. I dont even have like 20-30 tabs... usually 4-5. Facebook always seems to eat away at it too.

    I've switched to chrome to see if it'll help... I'll post a screenshot when it gets that bad again.
  11. macrumors 603

    Mar 14, 2008
    You have 10GB of Inactive RAM sitting idle and doing nothing, I don't see what the problem is?
  12. macrumors 65816

    Jul 23, 2011
    If you use Safari as your browser, replace it with the latest WebKit nightly:


    Current Safari in Mountain Lion has severe memory leak on Retina MacBooks (and mild memory leak on other computers) plus a lot of rendering issues that can cause bad performance. The latest nightly has fixed a number of them.
  13. macrumors 68040

    Feb 13, 2012
    Perth, Western Australia
    If an application is NOT RUNNING the OS SHOULD page it out.

    INACTIVE ram is used as cache, which is useful for RUNNING apps that are doing DISK ACCESS.

    This is not a problem, and is how modern memory management works. By design.
  14. macrumors 65816

    Jul 23, 2011
    Misinformed much?

    Inactive is NOT cache. It's recently used memory:


    So you're basically telling him that he just "recently used" 10GB RAM for... nothing at all.

    Which app would use up all 10GB (or more) and then spit it out like nothing if it did not have a memory leak?

    Also on page outs:

  15. throAU, Dec 4, 2012
    Last edited: Dec 4, 2012

    macrumors 68040

    Feb 13, 2012
    Perth, Western Australia
    It is ALSO cache.

    I don't care what you're pulling from an apple KB article (yes I've already read it), i can see it accumulating as I do disc accesses by copying files, etc.

    And yes when RAM is full you WILL get page outs. However a modern OS with an efficient memory allocator (and this includes OS X, newer versions of Windows, Linux, other Unix) will swap things out that don't need to be in memory pro-actively to ensure there is more RAM available for cache, to speed up disk access for the apps that ARE running.

    The app, once swapped out is likely kept in INACTIVE MEMORY as well, so that if it needs to be reclaimed, it doesn't need to be swapped back in from disk. However, if the memory is needed for something else, the inactive memory is re-allocated quickly, because the inactive app is already swapped to disk - the OS doesn't need to wait for the swap to disk to happen before it can re-alloc.

    The KB articles are sometimes very much a simplification for end users (and/or mis-interpreted), and are not necessarily fully representative of the way things work.

    To answer the OP: your ram IS being utilised. the SWAP is the OS proactively swapping inactive things to disk so that if something else needs the memory it can be allocated. the INACTIVE memory likely contains the contents of what was swapped to disk, and the things in inactive memory will be kept there in case they need to be "swapped back in" before the inactive memory needs to be reclaimed for something else. If the INACTIVE memory containing the "swapped" pages was not reclaimed, no swap in needs to happen, the inactive memory just gets marked active again.

    In short: unless your mac actually has a performance problem, don't go trying to look for issues in activity monitor. Well, by all means, look.... just don't jump to conclusions that things are bad if you see numbers for swap, without taking it into the context of what else is going on.

    Modern memory management is a LOT more complex than "free memory = anything I haven't loaded up with programs" and "swap = bad, i ran out of memory!". I'm sure the apple memory allocator probably also takes into account things i haven't listed above, such as whether or not the disk is an SSD, when it determines how aggressively it should try to proactively swap.

    Yes, you can get an idea of how bad memory pressure is if a machine is being forced to use swap a lot (in that case, your "inactive memory" size will be small and you'll have a lot of swap), but just looking at swap and seeing a number there is no reason to freak out about your memory not being used properly...

    In your case, with that much inactive memory, and only a tiny percentage of your system memory consumed in swap - you have nothing to worry about. If you had say, 8 gigs in swap, you'd have something to worry about.

    Oh and one more thing: the purge utility is a debug tool, intended for debugging. Yes, it will give you a bigger "free" memory number in actvitity monitor - by dumping the inactive memory contents. Which will interfere with the above memory management process, probably slow down disk access, etc. No, it won't break anything, but it likely won't fix anything either. Other than making the free memory number bigger.
  16. macrumors 65816

    Jul 23, 2011
    Inactive means memory that was "recently used". Simple as that.

    Basically, it should be called "temporary" instead of "inactive".

    When you have a lot of "inactive" memory, that means something is using up that much memory but is not marking the memory region as "active" (essential for the operation of the process).

    Don't believe me? You have a lot of reading to do...


    What your preconception of how an OS should act does NOT reflect what it actually does, nor does it reflect what the OS was designed to do.

Share This Page