[P1] To Partition or...! Virtual Memory

Tom R. no spam tr5374 at csc.albany.edu
Sun Jun 1 09:57:59 PDT 2003


To "see" VM:
Process Viewer has a Statistics tab at the bottom (v. 1.0, with
OS 10.1.4 is what I have).  I don't know how the value is
calculated, I have to guess it must be predictive since I don't
think I'm using VM at all right now (640MB RAM and few apps
running).

In Terminal, run the command "top" (ctrl-C to stop it).  In the
stuff at the top of the display, the last part is re use of VM.
Mine shows "VM: 1.13G + 41.4M   10040(0) pageins, 34(0) pageouts".

No pageouts means I'm not using virtual memory at all, I believe
(that is, I'm pretty sure, but who knows how Apple has implemented
top), since VM use is having your RAM fully used and needing to
bring something new into RAM, so the computer takes something
in RAM (eg something that hasn't been used much lately is one
rule (but optimal page swap algorithms are a topic of research,
and of Comp Sci "Operating Systems" course homework, which is
where I learned this stuff)) and "swaps" it out to disk, keeping
the something on record as in readily available memory but since
it's no longer in real RAM it is said to be in "virtual memory"
meaning virtual RAM.  The size unit of this swapping is a "page",
and no pageouts means I haven't had to swap any pages out of memory
in order to bring anything else in, ie no use of VM.

I'm guessing the VM entry means there is a total of 1.13 GB HD
space potentially available to use as VM (ie, this value agrees
with GetInfo about available disk space on this partition), and
there is always a default allocation of a minimum amount of disk
space done at bootup and that amount is as I recall 41MB.  (This
VM value is for me not using my separate swap partition at this
time, when I just ran top before I wrote this email.)

Pageins can be quite high without any pageouts, eg run a lot of
different programs sequentially so any one is done before the next
needs any memory so there's likely no competition for RAM.

On Sun, 1 Jun 2003, Joost van de Griek wrote:
 . . .
> On 2003-06-01 15:17, don hinkle wrote:
>
> > Jack, are you saying that OS X has virtual memory turned *ON* by default?
>
> Yes. OS X == UNIX, and UNIX has VM always on.
>
> > Is there a way to see it on my computer, whether on or off?
>
> What do you mean by "see it"? If you have very little RAM, open a buynch of
> apps and watch your computer slow to a crawl, at the same time churning your
> hard drive to pulp. That's VM at work.
 . . .



More information about the iBook mailing list