Is there a laptop Page I/O & Swap File Sticky?

Discussion in 'MacBook Pro' started by DoFoT9, Aug 26, 2009.

  1. DoFoT9 macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
    #1
    Hey everyone,

    I think there should be a sticky or guide for users who are confused about Page Ins/Outs and swap files.

    Take me for example: I have my CD MBP 2GB RAM, after 3 days it has used:

    Page ins: 1.32GB
    Page outs: 1.28GB
    Swap used: 2.15GB.

    This seems like a lot to me! But there doesn't seem to be much information about this kind of thing (there are plenty of threads about individual usage, but not a general guide):
    • what is the ratio of swap files to actual RAM for low/general/high use?
    • what is the ratio of ins to outs?
    etcetc.

    What does everybody think?

    DoFoT9
     
  2. gr8tfly macrumors 603

    gr8tfly

    Joined:
    Oct 29, 2006
    Location:
    ~119W 34N
    #2
    Something like this will help explain some of the terms. Mac OS X: Reading system memory usage in Activity Monitor

    If you have a relatively large number of page-outs, then you might gain some performance advantage by adding RAM. Otherwise, there's not much to be worried about. The size of the swap file doesn't mean it's all being used.
     
  3. DoFoT9 thread starter macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
    #3
    Yes, but something that gives actual numbers!

    e.g. If you are a heavy user with 2GB of RAM you should expect to see around 2GB of swap file being used.. or something of that equivalent.
     
  4. J the Ninja macrumors 68000

    Joined:
    Jul 14, 2008
    #4
    Swap file being used at all means you took a performance hit from lack of RAM at some point since you last booted up. The bigger it gets, the worse your lack of RAM is.
     
  5. DoFoT9 thread starter macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
    #5
    yes lol i understand that, i have an in-depth knowledge of how it works (just not the actual numbers based on certain things for each individual).... but other people will not, so i think it would be a good idea for that sort of thing.
     
  6. gr8tfly macrumors 603

    gr8tfly

    Joined:
    Oct 29, 2006
    Location:
    ~119W 34N
    #6
    I don't think there's a fixed formula. It's trends, not an absolute number. That's why the total number of page-outs is more important than how large they were. It's also how quickly it reached that number. If you use the machine for 1 hr, and it gets to a large value, it means something different than if you used the machine for a week and arrived at the same number. In the latter case, you might not notice any performance degradation. But, if the high number occurred over a short period of time, you might.

    I just don't think you'll get a consensus as to what, exactly, constitutes good vs. bad numbers.
     
  7. DoFoT9 thread starter macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
    #7
    and thats the sort of thing that i am after! i know there are no definite numbers as if varies per user/computer, but couldnt we say something like..

    a) if you use your computer with 2GB RAM and have more then half of your total RAM size as page-outs after 1 day, then you should think of upgrading RAM.
    b) if you use the same computer after a week and have half your total RAM as page-outs, then you generally are fine.

    or something alone those lines, would those statements be considered correct?
     
  8. gr8tfly macrumors 603

    gr8tfly

    Joined:
    Oct 29, 2006
    Location:
    ~119W 34N
    #8
    Yep. Something like that. ;)

    To get more precise numbers on paging, you need to run top from Terminal. There, you can see the number of page ins/outs (I thought Activity Monitor showed that, but only shows the total size swapped.). If you are seeing more than 50 or so per second (the number in the parenthesis), then you might be disk thrashing and in need of more physical RAM. You would definitely notice "something is not quite right". If it's only a few per second, you might not notice it at all.

    example from my MBP:
    According to Activity monitor, I have a VM size of 54.36GB, with 420.16MB page ins.
    top shows:
    Code:
    PhysMem:  606M wired, 1975M active,  362M inactive, 3206M used,  890M free.
    VM: 13G + 377M   107541(0) pageins, 0[B][COLOR="Blue"](0)[/COLOR][/B] pageouts 
    
     
  9. DoFoT9 thread starter macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
    #9
    great, i might chase this up and draw up a rough draft when i have some spare time. i think it would be useful for a lot of users.

    activity monitor shows the page ins/outs, but only as a GB number and not actual numbers of them..

    i would consider myself a heavy user, i have 4 spaces full of PDFs, many safari tabs, many word documents, parallels, + the normal mail/safari/adium thing happening so im used to the slow-down, especially on my older CD machine :( ahwell..
     
  10. gr8tfly macrumors 603

    gr8tfly

    Joined:
    Oct 29, 2006
    Location:
    ~119W 34N
    #10
    Sounds good - something that both has some "numbers" and a brief explanation taken from what's been posted here so far.

    Too bad I don't have any page-outs. There goes my rational for considering a pair of 4GB SODIMMs. ;)

    Wait. I was just thinking: "When does having a rational enter into it?" When the price comes down, I'll get them "just because". :D
     
  11. DoFoT9 thread starter macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
    #11
    yup for sure, i will run tests on my 4 mac computers (which all have different RAM amounts) to determine the results and whatnot. i might run a whole variety of programs and see how that goes too.

    no page outs? jealous! all my computers RAM is maxed out haha, i wish they would make the limitations higher (e.g. 16gb/32gb limits should be apparently in current laptops).
     

Share This Page