VM larger than available disk space??

I recently did something kinda fun: I launched all my applications at once! That includes every application that comes with Tiger, half the utilities that came with Tiger, and about 30 of my own apps. Although I don't have huge applications such as Photoshop or Final Cut Pro, I still think it was significant. And, the computer never crashed and never slowed down significantly. So anyway, that brings me to my question: when I was doing this, naturally my 1GB of ram ran out after about 6 apps. After that, the system resorted to VM, of course. But, I only had 11GB of disk space available (although, you will see in the screenshot that it says I only have 7GB free. That was after opening the apps. That's another thing I don't understand: disk space went down to 7GB when they were open and then went back up after). So, why is it that I was able to get 40GB of VM?? I thought that VM was just RAM that was on the HD. Now I'm not so sure. Here's a screenshot of when I had everything open:

http://signup612.googlepages.com/grab1.png

Any ideas about how this was possible?


-Eric

2.0GHz MacBook, 1GB ram, white, Mac OS X (10.4.7), 30GB iPod video

Posted on Aug 18, 2006 2:00 PM

Reply
7 replies

Aug 18, 2006 3:03 PM in response to macbook7

Hi, Eric.

I don't see anything in your screen shot to indicate that 11 GB of Available (free) disk space to begin with, nor that you had 7GB of free disk space at the time of this exercise. Your screen shot shows you had 11.83 MB of free RAM at the time.

The VM Size will differ both between available disk space and the size of the VM swap files (located in the /private/var/vm directory) as not all VM that is allocated is actually in-use. See the man page for the vm_stat command.

Your available disk space will decrease as VM increases, due to increased use of VM swap files, primarily due to swapping-out pages that have been allocated, but again won't necessarily match the VM Size. For example, the applications you are running and other system overhead may require nearly 40 GB of VM — a "potential maximum" — but only 4 GB of disk space (11 GB free at start - 7 GB free at end = 4 GB) may be occupied by swap files at present.

If, however, your system's need for swap files consumes all the available disk space, you could run into problems, such as kernel panics. See my "Problems from insufficient RAM and free hard disk space" FAQ for additional details.

Good luck!

😉 Dr. Smoke
Author: Troubleshooting Mac® OS X

---
Note: The information provided in the link(s) above is freely available. However, because I own The X Labâ„¢, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:

I may receive some form of compensation, financial or otherwise, from my recommendation or link.

Aug 18, 2006 3:13 PM in response to macbook7

OK, I see the "7.14 GB available" in the border of the Finder window that is overlayed by Activity Monitor. Fine. I answered your question nonetheless.

Next time, you might want to try a screen shot that shows all and only the relevant items you're discussing directly, e.g. the Get Info window for your hard drive next to the Activity Monitor window. It is unreasonable to expect someone to go digging through the screen shot with a jumble of overlaid windows. You could also add some annotations to the screen shot to highlight your points of discussion.

Good luck!

😉 Dr. Smoke
Author: Troubleshooting Mac® OS X

Aug 19, 2006 1:22 AM in response to Dr. Smoke

Yes, you did answer my question and you answered it very well. Thank you.

I'll be more clear with my screenshots next time. In this case I wanted to take a screenshot as quickly as possible, in case the computer crashed. I thought it was good enough that the finder window was there, but not everyone notices the same things. Oh well... But, I will put highlights and annotations next time that a situation like this occurs where I don't have much time or system resources to align my windows for a screenshot.

-Eric

Aug 19, 2006 8:00 PM in response to macbook7

Virtual memory is not just swap files. Open files are often mapped into virtual memory. In particular, applications are included in VM. If an application must be moved out of RAM, it does not need to be copied into swap space since it is already on disk -- in the application file. (I mean the application code and resources themselves, not data memory the app is using.) When you load an application, the system notes where it is on disk, and uses that instead of swap space. Read-only files are often handled the same way. Virtual memory is usually much larger than swap space+RAM.

Aug 20, 2006 4:29 AM in response to macbook7

OS X has always "allocated" virtual memory, even if it never physically uses it.

I just booted my system which has 1.8GB RAM
One swap file

According to Activity Monitor:
kernel_task is using 69MB Real Memory and 1.22GB Virtual Memory

A lot of times "VM" never goes to disk and is just, well, potential address space.

Still, you might consider upgrading RAM, and look into why you have so little free space, and do a couple backups, and off load some files. Your system should run better if the system is on and isolated to the outer tracks/partition and has more free space.

Aug 20, 2006 1:47 PM in response to The hatter

When I bought my MacBook I had considered upgrading all the way to 2GB (instead of the 1GB total that I currently have), but it was too expensive. Upgrading from .5GB to 1GB was only $120 (Canadian), but upgrading from .5 to 2GB would have been $600. I'm only a student so I can't afford it and didn't think it was worth it anyway (I don't consider 2GB to be 5 times better than 1GB).
I will be freeing up 10GB soon, bringing my total free space up to 21-22GB, which is fine for me. I don't do any super-intense stuff like photoshop or Final Cut Pro so I'm not really worrying right now.

-Eric

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

VM larger than available disk space??

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.