VM memory size doesn't matter. It isn't written to disk. In simple terms, its fake or ghost memory that doesn't matter to the end user. The number that does matter is the swap number. That is what gets written to disk when ram space gets low.
Thank you both! guess I worried for nothing
Yeah, I was thinking about some of those older computers like clamshells for example that have less that 1gb of RAM. Then again, with one of those, having a good amount of swappable VM albeit slower is better than having none at all ... and well, doing nothing because you ran out of RAM.
Thanks! Sorry for hijacking your thread Ih8Reno
As a point of interest, my G5 quad has just 4GB ram and the vm runs about 40GB...I was curious about this and thought maybe one o you can help me. On my quad with 10gb of ram my vm size is about 40gb. Is this normal or something I should be worried about.
I was told years ago that VM shouldn't really be more than 2.5x your actual installed memory & ideally 1.5x. If it is more, the OS attempts to use it instead of your installed memory which slows down performance etc (swapping to disc is much slower vs. RAM). This was specifically a discussion in regards to windows gaming boxes but I don't think the os matters much.
Those are windows specific numbers for the page file. They don't have any relevance to OS X.
Intell covered it in post 3.
Each process can have 4GB (32-bit) or 16EB (64-bit) of logical (virtual) memory space, so there is no correct number. The logical memory is divided into uniformly sized chunk called pages. The memory manager in OS X then maps logical memory pages to physical RAM or backing store as appropriate. Once the physical RAM runs low then OS X starts utilising the backing store (swap file) and performance will start to suffer.
There's a few rules for "the other operating system", where the page file defaults to 1.5x system RAM when created. Mainly so it can copy the contents of system RAM to the page file in the event of a blue screen for debugging purposes.