PDA

View Full Version : virtual memory




chris200x9
Jul 17, 2007, 02:14 PM
I have a macbook with a 120 gb hardrive and I was just wondering how i could use more virtual memory than my entire hardrive?



Mitthrawnuruodo
Jul 17, 2007, 02:23 PM
Seems like a good time to restart Photoshop (and maybe the whole machine). ;)

MacsRgr8
Jul 17, 2007, 03:38 PM
Before you do restart, could you please post the contents of your /var/vm/ please?
Just out of curiosity... tnx!

WildCowboy
Jul 17, 2007, 04:02 PM
The VM total is just the amount that could be used if every single app claimed every last bit it thought it needed, all at the same time. You're not using anywhere close to that...obviously. For instance, my VM is currently just over 12 GB, but my swapfiles only add up to 1 GB.

But yes, 176 GB is awfully big. :eek:

bankshot
Jul 17, 2007, 04:05 PM
The VM size is not real. That is, it doesn't actually correspond to the amount of memory in use or the amount of swap space on the disk. It's simply the total amount of memory address space that has been requested by your applications. Many applications will request much more space than they need "just in case". The memory isn't actually taken or marked as in-use unless the application actually does something with it.

Think of it as a theoretical upper bound for memory usage if every open application went nuts and used every bit of memory it asked for. This will never happen in the real world.

As MacsRgr8 suggested, the contents of /var/vm will tell the real story in terms of actual swap space used on disk. The files "swapfile0", "swapfile1" etc are what you want to look at; if you have a "sleepimage" file, ignore that - it's a copy of your entire RAM the last time the computer went to sleep (for safe sleep purposes).

My Macbook currently shows a VM size of 10.66 GB, but the swapfile total is only 128 MB. This is not unusual.

[Edit: Bah! Beaten by WildCowboy! :D]