Macbook RAM swap from 64MB to 128 MB and kernel_task

Discussion in 'MacBook Pro' started by reubs, Nov 20, 2006.

  1. reubs macrumors 68000

    Joined:
    Jun 22, 2006
    #1
    I keep track of my RAM usage using iStat nano, and every few days the RAM will swap from 64 MB to 128 MB. The RAM usage will stay at 128 MB until a restart. I checked Activity Monitor, and kernel_task is the big RAM user w/ 1.20 GB of Virtual RAM and 44 threads.

    Is there any relationship with those two, or are they completely separate? Also, should this be something I keep an eye on RE: how reliable my RAM is?

    Thanks for any info.
     
  2. Transeau macrumors 6502a

    Transeau

    Joined:
    Jan 18, 2005
    Location:
    Alta Loma, CA
    #2
    Exactly What "ram" is swapping from 64M to 128M?

    Wired?
    Active?
    Free?
    Inactive?

    Are you saying that you Macbook is only using 64M of ram? (I think OS X's average is like 600M)
     
  3. reubs thread starter macrumors 68000

    Joined:
    Jun 22, 2006
    #3
    Hey thanks for replying. I've attached a screenshot of my iStat nano, so maybe that will make it a little more clear.
     

    Attached Files:

  4. Transeau macrumors 6502a

    Transeau

    Joined:
    Jan 18, 2005
    Location:
    Alta Loma, CA
    #4
    can you attach a clip from the activity monitor? Mainly the system memory?

    Like this one..
     

    Attached Files:

  5. stcanard macrumors 65816

    stcanard

    Joined:
    Oct 19, 2003
    Location:
    Vancouver
    #5
    I used iStat Nano for about 2 days (then it started to eat 100% CPU and crashed, but that's another story).

    Basically I would recommend you just ignore the swap numbers -- I never could figure out what it was reporting. It bore no relation to my VM file which was about 12GB at the time, and bore no relation to any other number I could pull from top or activity monitor.
     
  6. Transeau macrumors 6502a

    Transeau

    Joined:
    Jan 18, 2005
    Location:
    Alta Loma, CA
    #6
    Some info on memory... Definitions..

    Wired: Wired memory is memory that can not be swapped out. Kiss this goodbye :) The system is making use of it..

    Active: Memory that is currently, or has been in use recently. This can be applications, cache, buffers, etc...

    Inactive: Memory that hasn't been in use for some time. It's allowed to be swapped out to disk and released to the Free pool. The system will not flush this unless an application tells the VM that it's done with it, or the kernel is done using it for caching or a cleanup process determines that it was abandoned. (this is rare on OS X)

    Total: The sum of the above 3

    Free: Memory that has not been used, or was used and has been cleaned and moved back into the free pool. 10.4 tries to keep about 300MB free, once it hits that point the VM starts swapping to disk.

    VM Size: The total physical and swap memory currently available to the system.

    Page Ins/Outs: Page Ins are when a page of memory was referenced, but it wasn't in the address space of the application. It may have been in RAM, but moved to inactive, or on the disk. Page Outs are when a Page of memory was send to the disk because there was not enough Free physical memory available. Page Outs are bad... this is SLOW and it means that you are going to have a SLOW Page In too. Page Ins are fast or slow, depending on if the page was somewhere in physical memory or virtual memory (disk). Page Outs are always slow, because they are in virtual memory.

    Bottom Line is you have nothing to worry about unless you have Page Outs. And then it's only a worry if you have a lot of them. Even with 6GB, my Mac Pro will still page out. It's not often, just when I'm running Final Cut Studio and open Parallels.

    Also, I now some people are going to bitch about this post... This is simplified.. If you need the full gory details, you can read Apple's 53 page document on memory management here: http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/ManagingMemory.pdf
     
  7. Transeau macrumors 6502a

    Transeau

    Joined:
    Jan 18, 2005
    Location:
    Alta Loma, CA
    #7
    As for swap files..
    OS X will ALWAYS keep at least 1 64MB swap file open. If you system is low on memory it will open more and/or larger swap files. It's possible what you are seeing is OS X opening up another swap file. Once it uses 50% of the first 64MB swap file, it will open a second.
     
  8. Transeau macrumors 6502a

    Transeau

    Joined:
    Jan 18, 2005
    Location:
    Alta Loma, CA
    #8
    One addition to the defs above... I can't find a clean answer, but it's possible that the Page Ins could include moving a 4kb page from the system memory to the CPU's cache..
     
  9. reubs thread starter macrumors 68000

    Joined:
    Jun 22, 2006
    #9
    Here's a recent screen grab just taken of Activity Monitor. Kernal Task is up at 1.22 GB with 44 threads after almost 10 days of uptime. This is the longest I've gone w/o restarting, so I'm sure that has something to do w/ the high numbers.

    Thanks to everyone for your feedback and help w/ this inquiry.
     

    Attached Files:

  10. Transeau macrumors 6502a

    Transeau

    Joined:
    Jan 18, 2005
    Location:
    Alta Loma, CA
    #10
    your numbers don't look bad at all. You do have a lot of programs running, and the OS is swapping to disk. However, your swap numbers look pretty good for 10 days. kernel_task at 1~2GB is normal, that should be about the same as your "total".

    Overall, you're in great shape.
     

Share This Page