Physical vs. Virtual Memory

  • Thread starter Richard Fangnail
  • Start date
R

Richard Fangnail

If XP runs out of physical memory, it is supposed to start using
virtual memory which is the hard disk.

If it starts using virtual memory, wouldn't the performance noticeably
be slower?

How can you tell when and if Windows is using virtual memory - for
example, would Windows Task Manager show you?

I have 512M memory and the processes in Task Manager appear to add up
to about 300M memory - doesn't that mean virtual memory is not being
used at all?
 
T

Thee Chicago Wolf (MVP)

If XP runs out of physical memory, it is supposed to start using
virtual memory which is the hard disk.

If it starts using virtual memory, wouldn't the performance noticeably
be slower?

How can you tell when and if Windows is using virtual memory - for
example, would Windows Task Manager show you?

I have 512M memory and the processes in Task Manager appear to add up
to about 300M memory - doesn't that mean virtual memory is not being
used at all?

Virtual memory does get used even if you have 4GB of RAM (32-bit) or
more (64-bit). If task manager says you're using 300MB of your 512MB,
that doesn't mean that you have 212MB of free memory. Devices in your
system take up chunks of memory, not just programs, so that number is
not always representing the whole picture.

- Thee Chicago Wolf (MVP)
 
S

Shenan Stanley

Richard said:
If XP runs out of physical memory, it is supposed to start using
virtual memory which is the hard disk.

If it starts using virtual memory, wouldn't the performance
noticeably be slower?

How can you tell when and if Windows is using virtual memory - for
example, would Windows Task Manager show you?

I have 512M memory and the processes in Task Manager appear to add
up to about 300M memory - doesn't that mean virtual memory is not
being used at all?

512MB is usually sufficient for most Windows XP users - although I recommend
minimums of 1GB for Windows XP w/SP3 and 3GB for Windows Vista w/SP2 - not
because most users *need* that much, but because most users will find those
amounts to be easy/inexpensive to get and they will seldom find a need for
more. Memory is a lot like hard disk drive space in that having more than
you need is just wise - especially when the cost is so low - because your
needs vary and if you ever use it all - you will need to buy more anyway.
;-)

Windows will use virtual memory when it feels it should - essentially. If
you have a program you have minimized and not used for some time (as it is
just minimized) that bit may be 'moved' to virtual memory. Yes - there
*will be* a slight delay when going back to the application in question
(albeit measured likely in milliseconds or less, I would bet.)

You should read up som, if you really are interested:

RAM, Virtual Memory, Pagefile and all that stuff
http://support.microsoft.com/kb/555223

Virtual Memory in Windows XP
http://www.aumha.org/win5/a/xpvm.php

A small utility to monitor pagefile usage:
http://www.dougknox.com/xp/utils/xp_pagefilemon.htm
 
U

Unknown

Not necessarily NOTICEABLY slower. It would be application dependant.
Suppose for example your memory is full but you want to run a small program.
One of the programs in memory will be written to the disk and the one you
wish to run
will be loaded into memory. That may be accomplished in 80 milliseconds for
example.
Would you recognize 80 milliseconds? You can check task manager for memory
usage.
 
R

Richard Fangnail

Virtual memory does get used even if you have 4GB of RAM (32-bit) or
more (64-bit). If task manager says you're using 300MB of your 512MB,
that doesn't mean that you have 212MB of free memory. Devices in your
system take up chunks of memory, not just programs, so that number is
not always representing the whole picture.


I thought Virtual Memory was an "overflow" thing - what is VM used
for, even if not much RAM is being used?
 
S

Shenan Stanley

Richard said:
Virtual memory does get used even if you have 4GB of RAM (32-bit)
or more (64-bit). If task manager says you're using 300MB of your
512MB, that doesn't mean that you have 212MB of free memory.
Devices in your system take up chunks of memory, not just
programs, so that number is not always representing the whole
picture.

<Original Poster Responded to Themselves...>

Richard said:
I thought Virtual Memory was an "overflow" thing - what is VM used
for, even if not much RAM is being used?


Please read and follow-up on the posts you have received thus-far...

In case you missed the responses...


Shenan said:
512MB is usually sufficient for most Windows XP users - although I
recommend minimums of 1GB for Windows XP w/SP3 and 3GB for Windows
Vista w/SP2 - not because most users *need* that much, but because
most users will find those amounts to be easy/inexpensive to get
and they will seldom find a need for more. Memory is a lot like
hard disk drive space in that having more than you need is just
wise - especially when the cost is so low - because your needs vary
and if you ever use it all - you will need to buy more anyway. ;-)

Windows will use virtual memory when it feels it should -
essentially. If you have a program you have minimized and not used
for some time (as it is just minimized) that bit may be 'moved' to
virtual memory. Yes - there *will be* a slight delay when going
back to the application in question (albeit measured likely in
milliseconds or less, I would bet.)

You should read up som, if you really are interested:

RAM, Virtual Memory, Pagefile and all that stuff
http://support.microsoft.com/kb/555223

Virtual Memory in Windows XP
http://www.aumha.org/win5/a/xpvm.php

A small utility to monitor pagefile usage:
http://www.dougknox.com/xp/utils/xp_pagefilemon.htm

and
 
D

Don Phillipson

I thought Virtual Memory was an "overflow" thing - what is VM used
for, even if not much RAM is being used?

You are mistaken. VM (swap file) was built into MS Windows from
the beginning to enable you to load an app and a data file that
together might exceed available RAM capacity: and thus remains
since those decisions (of the 1980s) integral to the operating system.
Our capacity to disable VM does not mean it is an "overflow thing."
 
G

Gerry

Richard

The simple test to determine whether the pagefile ( virtual memory ) is
being used is to compare the Total figure under Commit Charge on the
Performance tab in Task Manager with the amount of installed RAM. If the
Total exceeds 512 mb then the system is using the pagefile. If the Total
is less than 512 mb then very little use is being made of the
pagefilefile. You cannot ever say no use is being of the pagefile
because some system functions use the pagefile rather than RAM memory.
You will also find some programmes require a pagefile in order to be
able to run. You should not ignore the peak figure because this
indicates what is the highest Total figure since the computer was
booted.

More accurate measurement is possible using pagefilemon.

Use page file monitor to observe what is the peak usage. Start it to run
immediately after start-up and look at the log. Pagefilemon takes
snapshots. You need to run it at the beginning of the session at then
run it again at intervals throughout the sessions. The log is Pagefile
log.txt. If you right click on the file in Windows Explorer and select
Send to, Desktop (Create Shortcut). The same applies to
XP_PageFileMon.exe.

A small utility to monitor pagefile usage:
http://www.dougknox.com/xp/utils/xp_pagefilemon.htm

Note that programs using undo features, particularly those associated
with graphics and photo editing, require large amounts of memory so if
you use this type of programme check these first observing how the page
usage increases when they start and whether the usage decreases when you
close the programme.


--


Hope this helps.

Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
 
T

Tim Slattery

Richard Fangnail said:
If XP runs out of physical memory, it is supposed to start using
virtual memory which is the hard disk.

Not really. It pretty much always uses the swap file to some extent.
If it starts using virtual memory, wouldn't the performance noticeably
be slower?

If it just uses the swap file to page out an inactive task to make
room for one you're actively using, then no. If it has to constantly
page out an active process to make room for another active one, then
you'll see a slowdown.
How can you tell when and if Windows is using virtual memory - for
example, would Windows Task Manager show you?

Yes, Task Manager's "Performance" tab. One of the items there is page
file usage.
I have 512M memory and the processes in Task Manager appear to add up
to about 300M memory - doesn't that mean virtual memory is not being
used at all?

As I said earlier, it always uses it to some degree. In your case,
usage should be minimal.
 
G

Gerry

Tim

"Yes, Task Manager's "Performance" tab. One of the items there is page
file usage."

Where?


--


Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
 
S

Shenan Stanley

Richard Fangnail wrote:
How can you tell when and if Windows is using virtual memory - for
example, would Windows Task Manager show you?

Tim Slattery wrote:
Yes, Task Manager's "Performance" tab. One of the items there is
page file usage.
Tim

"Yes, Task Manager's "Performance" tab. One of the items there is
page file usage."

Where?

I'm not Tim, but...

http://www.online-tech-tips.com/win...er-processes-programs-and-performance-part-3/

"Paged" - bottom right.
 
G

Gerry

Shenan

I don't think that is a usage figure. That's what can be so confusing
with Task Manager. You think you are looking at usage figures and the
reality can be an allocation.

Kernel Memory Total-This number shows the amount of paged and nonpaged
memory used by the operating system's kernel. The kernel is the central
core of the operating system that does most of the background work.
Kernel Memory Paged-This number shows the amount of virtual memory set
aside for the kernel.
Kernel Memory Nonpaged-This is the amount of RAM dedicated to the
operating system's kernel.
Source: http://technet.microsoft.com/en-us/library/bb742598.aspx

Please note the usage of the words "set aside".

Also, unless I am mistaken, that figure relates to the operating system
and does not encompass other pagefile users.

FWIW Task Manager here currently shows Paged as 40,980. Pagefilemon
shows current usage as 70 mb.

--


Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
 
S

SC Tom

Gerry,
On my Performance page in Task Manager, the page file usage and history
charts are right below my CPU usage and history charts. I can watch the
usage go up and down as I open and close various programs. I would think
that shows some sort of usage, wouldn't it? Of course, I may be wrong. It
certainly wouldn't be the first time.

SC Tom

Gerry said:
Shenan

I don't think that is a usage figure. That's what can be so confusing with
Task Manager. You think you are looking at usage figures and the reality
can be an allocation.

Kernel Memory Total-This number shows the amount of paged and nonpaged
memory used by the operating system's kernel. The kernel is the central
core of the operating system that does most of the background work.
Kernel Memory Paged-This number shows the amount of virtual memory set
aside for the kernel.
Kernel Memory Nonpaged-This is the amount of RAM dedicated to the
operating system's kernel.
Source: http://technet.microsoft.com/en-us/library/bb742598.aspx

Please note the usage of the words "set aside".

Also, unless I am mistaken, that figure relates to the operating system
and does not encompass other pagefile users.

FWIW Task Manager here currently shows Paged as 40,980. Pagefilemon shows
current usage as 70 mb.

--


Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
 
G

Gerry

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top