How To Determine Your Memory Needs One good way to determine how much memory you need, is determining how much paging your system is performing when you're computing. To do this open your Terminal in your Utilities folder. Type in top and press return. Then examine the output as in the example below.
At the end of the PhysMem (Physical Memory) line, you can see that the Mac in this example has 1.5 Gb of RAM (454 Mb used + 1.06G free = 1,514 Mb = 1.5 Gb).
Processes: 68 total, 5 running, 63 sleeping... 211 threads 19:19:18
Load Avg: 2.45, 1.30, 0.56 CPU usage: 78.4% user, 21.6% sys, 0.0% idle
SharedLibs: num = 104, resident = 29.4M code, 2.92M data, 10.7M LinkEdit
MemRegions: num = 10712, resident = 124M + 19.2M private, 100M shared
PhysMem: 132M wired, 150M active, 172M inactive, 454M used, 1.06G free
VM: 5.81G + 72.1M
19593(0) pageins, 1(0) pageouts Now note the pageins and pageouts in the last or VM (virtual memory) line:
19593(0) pageins, 1(0) pageouts The numbers before the parentheses, 19593 and 1 in this example, indicate the total pageins and pageouts, respectively, performed since this Mac was last restarted. As you use your Mac, both numbers will increase. If the total pageouts is low — ideally 0 — compared to the number of pageins after having used your Mac for hours, you may have sufficient RAM. Otherwise, I recommend you install more memory.
The numbers you see within the parentheses are very important also. These indicate the number of pageins or pageouts performed in the last one second. If these values — especially pageouts — are consistently in the range of 25 to 50 or more, then the system is swapping VM files to your hard drive as it is starved for RAM at its current workload. Overall performance will slow as the CPU spends more time paging than on other work. If your Mac is creating VM swap files, you need to install more memory!
VM swap files are invisible and can eat up a lot room of your hard drive space if you're running with insufficient memory. I ran my PowerMac G5 for a week with the stock 512M amount of RAM when I first got it and it built up 2Gs of VM swap files!
Even with a large amount of memory, such as the 1.5 Gb in this example, pageouts and pageins can be high with very processor-intensive activities, such as playing back a DVD video or doing video compression. Therefore, it is the numbers in parentheses -- pages in or out per second -- that are the most critical in determining when VM swapping is occurring and if more memory is critically required.
To monitor your memory usage and how many virtual memory swap files you may be accumulating on your hard drive, read this:
Monitoring Memory Usage & Swap Files >>To locate your VM swap files and other junk files you may have on your hard drive, use
OmniDiskSweeper. VM swap files are located at private > var > vm > swapfile0. You can also use a utility like
Onyx to delete VM swap files.