760 Views 4 Replies Latest reply: Apr 23, 2009 11:20 AM by felibb
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
Ok, I rebooted, did not launch Transmission (µTorrent instead) and here's my sar output:
~ felibb$ sar -g 30 10
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.