Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Switz213

macrumors 6502
Original poster
My mac is taking up 42.8 Gigs of VM.

The only windowed programs running are Safari, QuickSilver, and Activity Monitor. No other special processes running either.

Is this normal?
 
Measured how? If you mean the VM size in Activity Monitor is 42Gb then this does not mean you are using that much virtual memory or anything similar.
 
To see how much VM is actually being used:

sudo du -h -d1 /var/vm

Code:
yellow$ sudo du -h -d1 /var/vm
Password:
1.0G	/var/vm
 
It says VM Size: 42 GB. I assumed that was it.

Especially since it says I have around 80 MB of space left and I know I have a lot more then that actually.
I tried that command, but nothing showed up after I entered my pw.
 
It says VM Size: 42 GB. I assumed that was it.

Especially since it says I have around 80 MB of space left and I know I have a lot more then that actually.
That's the theoretic maximum if all of the processes (not just windowed ones) running used ALL the RAm they could. It'll never happen.

You might want to read this Apple article regarding the free memory: you almost certainly have more.
 
If you're looking at "Free:", then that number is free, unused, unallocated RAM.
"Inactive:" is allocated RAM that is unused and should be counted as "free" RAM.

I believe the "VM Size" is the maximum that the OS will try to use as VM, should the need arise, which it's not.

EDIT: <-- too slow.
 
Yes, but there is something messed up as the lowest process is update
its using 500+ MB of VM. Thats the lowest...
 
Yes, but there is something messed up as the lowest process is update
its using 500+ MB of VM. Thats the lowest...

Ignore that column. It's not using 500Mb of memory, real or virtual. That's the max allocation it could use. It's not using it. It almost certainly never will.

If you really want to know how much virtual memory you are using right now open the Terminal and type "du -ks /var/vm/swapfile*" (without the quotes). That will show you all the swap files that your system has in Kb. Note the may not get removed instantly when not needed.
 
Then why do I have 90 MB of free HARD DRIVE space. I mean go into finder and look at the bottom of a window. Not on the act. monitor.
 
To see how much VM is actually being used:

sudo du -h -d1 /var/vm

Code:
yellow$ sudo du -h -d1 /var/vm
Password:
1.0G	/var/vm

That's not a good idea as that includes the sleepimage which is the size of your machines RAM if it's gone to sleep (using safe sleep). So for me that reports a number 2Gb larger than the amount of virtual memory I've actually used...

Then why do I have 90 MB of free HARD DRIVE space. I mean go into finder and look at the bottom of a window. Not on the act. monitor.

You have far too many files? Seriously: just do what we've told you to find out exactly how much space is being used by swapfiles. It's really easy and will actually tell you what's going on instead of all this pointless speculation.
 
That's not a good idea as that includes the sleepimage which is the size of your machines RAM if it's gone to sleep (using safe sleep). So for me that reports a number 2Gb larger than the amount of virtual memory I've actually used...

True. I never, ever, ever put this machine to sleep, therefore, no sleepimage.

Even though it might be 2GB larger than it needs to be, it would be enough to prove to the OP that his Mac isn't using 42GB of VM. 🙂
 
Sorry, I don't mean to be harsh, but my last few posts have come off a bit that way lol.


I did what you said.
65536 /var/vm/swapfile0
65536 /var/vm/swapfile1
131072 /var/vm/swapfile2
262144 /var/vm/swapfile3
262144 /var/vm/swapfile4
262144 /var/vm/swapfile5
262144 /var/vm/swapfile6
262144 /var/vm/swapfile7


I am 100% sure, that I should have atleast 10 GB of space left.
It just jumped from 90 MB back to 92 MB, and before it was at 200 MB.
 
Use OmniDiskSweeper or something of that ilk to find where your missing disk space has gone.
 
Wtf

A Mac will use as much memory as is available. If you have less hard drive space, it will use less VM. It's just a precaution if you do start running a lot of programs.

These type of things are better left worried about by those people who understand them. You don't seem to, so I wouldn't worry much.
 
Then why do I have 90 MB of free HARD DRIVE space. I mean go into finder and look at the bottom of a window. Not on the act. monitor.

Yeah, I think you may be getting confused on how the memory is allocated in OS X. You can't possibly have only 90MB of HDD space, your Mac wouldn't run. When you get to around 5GB left the Mac will notify you by an on screen message that it will not be operable until you free up some HDD space.
 
A Mac will use as much memory as is available. If you have less hard drive space, it will use less VM. It's just a precaution if you do start running a lot of programs.

These type of things are better left worried about by those people who understand them. You don't seem to, so I wouldn't worry much.

The size of your hard disk has no bearing whatsoever on the "VM Size" reported through Activity Monitor.

The VM Size figure is a total of the requested Virtual Address Space by all processes running on the system. However, because of the way Mac OS X handles memory allocation, a reported VM Size of 42.8 GB will not consume 42.8 GB of resources (in memory or on your hard disk). When a request to allocate memory is handled by the kernel, it creates a new virtual object--which you might think of as a small record of the request--but it does not allocate any pages to the request. Pages are the actual slices of memory that consume real space, both inside memory and on the hard disk.

Basically, the kernel does lazy allocation. It figure that applications, for the most part, request to have much more memory allocated than they will really ever use. The kernel waits until a process starts reading from or writing to these requested addresses before actually allocating pages--and even then it will only allocate enough pages to satisfy that operation.

As has been stated before, if you want an accurate picture of how much space is really being consumed by virtual memory, you need to look at how many swapfiles have been created in the /var/vm folder.

Regarding your lack of space problem, I would grab a free copy of WhatSize to find the largest space offenders.
 
Yeah, I think you may be getting confused on how the memory is allocated in OS X. You can't possibly have only 90MB of HDD space, your Mac wouldn't run. When you get to around 5GB left the Mac will notify you by an on screen message that it will not be operable until you free up some HDD space.

My powerbook 1.67 Tiger didn't give me any onscreen popup when a backup program spun out of control. It did ~5 minutes after I figured out what the problem was, and fixed it though. What I am saying is, it DID give me the error you refer to, but not until I resolved the error, and the OS "sped" back up. If he has not resolved the problem, it may not be able to give him the error. I spend an hour with it doing what it was doing before I resolved the problem. I knew what the problem was, I just had more pressing things to deal with at work.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.