dstyrk said:
Duex ex Machina said:
How does the ratio work with pages in? My pages out is in the hundred thousands here...but there's a 1GB of RAM!
I second this guys question... I even closed all my apps, and with 1GB I should have like 700MB free.. Let alone the page out number..
If I reset my computer I will go back down.. How long should this normaly take?
Mine
Memory management 101 (This is not perfectly accurate but is good enough to give you an idea of what the numbers mean). When an application is initialized it is given a virtual address space of 4 GB. As it uses this space information is read from the disk into memory. The process of reading information into memory is a
Page In.
As applications get used real memory will get allocated to these virtual address spaces. For applications that are actively in use this memory is considered "Active Memory." For applications that have closed or are not active the memory spaces are kept in physical memory for convenienvce but are marked as "Inactive Memory." By keeping the address spaces in Inactive Memory OS X (and other OSes) mitigate the need for Page Ins, thus increasing responsiveness. So if you repoen an application it does not need to reread it from disk, but instead can just use the copy in memory.
Operating Systemes like to keep a certain amount of physical memory unallocated so that if an active application needs more memory it can get it quickly. If the amount of free physical memory falls below a certain threshold or an active application requests more memory than is currently available then memory will need to be freed. This is done by performing a
Page Out which is the process of writing a chunk of memory to disk. Optimally the operating system will perform page outs during idle time to keep sufficient memory available for active applications. A worst case scenario is if the active applications require more memory than is available. In this case memory pages will be written to and from disk as the applications run. This is called thrashing, and performance goes straght down the drain at that stage.
In short the page ins are nothing more than applications being loaded into memory. Page outs could be just inactive memory being freed to ensure good performance. If you get page outs occasionally as you use the system that is fine. If you are getting pageouts continually then you shouild consider getting more memory.
As an example I have had 30,000 and change page outs since I started my PB last week. That is a somewhat high number, but not when you consider they have occurred over 6 days and change. I use a lot of different programs, but not all at the same time so occasionally some of the programs had to be paged out. This is fine. If I had 30,000 page outs in 8 hours though then more memory might be prudent. There is no hard and fast rule. Just monitor the amount of active, inactive, and free memory you have and how often the OS needs to push data to disk to continue running.
I hope that helps.