4 Replies Latest reply: Apr 23, 2009 11:20 AM by felibb
felibb Level 1 (5 points)

I noticed this a little bit of a strange behavior recently. Once I power my Mac up, the amount of free memory is around 1.34 GB, as I don't have many startup items. Then I launch Skype and torrent client (µTorrent or Transmission) and wait about 10-12 minutes - the amount of inactive memory becomes almost half of total, 20-30 MB free, and swap file is already in use. I mean is that normal with total physical RAM of 2 GB? As far as I know the Unused memory is used for apps I quit not to reallocate it once I launch it again. Nothing launched - nothing to keep unused, right? And swap file is in use for a reason I don't quite well understand. I mean I got the idea behind virtual memory, but this behavior is something that haven't been there before. Just in case - I "Erase & Install"-ed the system last week, so it is pretty "clean".

Also the screenshot of my iStat pro widget to illustrate the situation.

MacBook 13-inch Aluminum (Late 2008) 2 GHz 2 GB DDR3 , Mac OS X (10.5.6)
  • V.K. Level 9 (56,110 points)
    I know that Transmissions is very well known to cause the behavior you describe.
    I had very limited use of it and I saw the same thing and I've seen many reports by others about it too.
    there is no need to reinstall the OS as it will not fix this.
  • felibb Level 1 (5 points)
    Actually I reinstalled OS just to see how what it is like and to clean up the mess a bit. Also Xcode started quitting immediately after I launch it, so I chose the easiest way to fix the problem.

    Ok, I will now try to reboot and launch µTorrent instead of Transmission to see if it is the reason.
  • BobHarris Level 6 (16,990 points)
    Swapping happens because there is more demand for memory than you have, and some modified pages have been sitting idle longer than other pages that are in use.

    If you think you have too little memory for the application set you are using, then do the following and find out. Launch Applications -> Utilities -> Terminal and enter the command:

    sar -g 60 100

    This will tell you the pageout information every 60 seconds for 100 minutes (adjust 60 and 100 to suit your tastes).

    If you mostly have zeros or very low numbers, then you do not have a serious memory problem. If you have an occasional burst of pageouts, but the rest of the time it is zero, you do not have a memory problem. However, if you have sustained pageouts, especially when you notice a performance slow down, then you could benefit from more memory, or run applications that are less memory intensive (or if running too many concurrent applications that you are not really using, quit a few).

    Programmers tend to write applications that consume as much memory as they like without concern for how much memory you actually have. In some cases they have have development systems with a lot more memory than you do, so they don't even notice that they are consuming a lot of memory. This is speaking as a programmer that started life writting code on 80 column punched cards and running them on systems with 8192 bytes of memory
  • felibb Level 1 (5 points)
    Ok, I rebooted, did not launch Transmission (µTorrent instead) and here's my sar output:

    ~ felibb$ sar -g 30 10

    20:55:34 pgout/s
    20:56:04 0.0
    20:56:34 0.0
    20:57:04 0.0
    20:57:34 0.0
    20:58:04 0.0
    20:58:34 0.0
    20:59:04 0.0
    20:59:34 0.0
    21:00:04 0.0
    21:00:34 0.0
    Average: 0.0
    ~ felibb$

    Also my Activity Monitor says that there are currently no Pageouts and swap is not being used at all. The amount of inactive memory is around 150 MBytes. All of the above convinces me that it was Transmission memory leak. Consider my question solved, thanks for all replies and attention.