Swapping even when turned off?

G

Guest

(sorry if this thread appears twice, by net connection's acting up a little
today)

I have 1GB of RAM, more than I'm ever going to use, so I thought I'd turn
off the swap file on the hard drive - there'd be no need for it. However,
Task Manager still reports that my Pagefile usage is over 250MB! More
disturbingly, the Processes list still reports that everything's page
faulting, as much as it did when I still had a swap file.
So I thought maybe Windows can't survive without a swap file (for whatever
stupid reason) so I created a small swapfile on the hard drive, with min and
max both on 2MB. Unfortunately, despite the max being 2MB it still allocates
1.5GB (being the reccomended size, being 1.5x my main memory size)...

Does anyone know why either of these are happening?
 
D

David Candy

You can't turn off swapping in XP. All you've done is remove a major part of the swap space forcing system critical code and data to be paged into places like the registry files and exe files (and unused code). If the swap was on it could page out unused data. Not to mention that you are loosing cache space. Fonts will probably also be swapping into their files.

What on earth would prompt someone to turn off the swap file. Unless you think you know more than the designers. But you don't. You know almost absolutely nothing. Use your computer - it is what it's there for.
 
R

R. McCarty

That 250 MB's isn't a "Pure Pagefile Use" meter. To XP, it's total
memory is a combination of physical and virtual memory. That PF
meter is simply an indication of current mapped memory use.
You can use an XP tool Perfmon.Exe to load counters and view
the actual Pagefile usage as a % of the total pagefile.
Disabling the Pagefile is never a good idea. Use TaskMgr and
add columns for VM Size and Memory usage and Peak Memory
usage to see how services/apps require and utilize memory.

"David Candy" <.> wrote in message
You can't turn off swapping in XP. All you've done is remove a major part of
the swap space forcing system critical code and data to be paged into places
like the registry files and exe files (and unused code). If the swap was on
it could page out unused data. Not to mention that you are loosing cache
space. Fonts will probably also be swapping into their files.

What on earth would prompt someone to turn off the swap file. Unless you
think you know more than the designers. But you don't. You know almost
absolutely nothing. Use your computer - it is what it's there for.
 
G

Guest

You know almost absolutely nothing. <<
What makes you think I know nothing of this?
I just finished an Operating Systems course at university, so I know whereof
I speak. Of course you had no way of knowing that, but there's no reason for
you to assume I'm just some computer-illiterate moron who should blindly
trust all of Microsoft's suggestions for how my computer should run.
The problem is it will also page out used data. Any paging algorithm will do
this. Thus taking up time and disk space that could otherwise be used
elsewhere.
Swapping memory is used for one thing and one thing only: to free up memory
for other processes. But if there is less memory used than there is avaliable
(and this will always be the case - I'm not going to be using 1GB
concurrantly any time soon) then there is absolutely no need to swap out any
pages at all, they can all be held resident with no ill effects whatsoever.
Swapping them out would free memory, but that memory would not be used, and
it would only waste HDD time and space, and would cause unneccary delays and
page faults when the page needs to be read back in again.

Oh, and I have checked the peak memory usage, and even after a long time of
activity and with all the programs open that I usually do the sum of all the
"Peak Memory Usage" values in task manager still doesn't reach the 1GB mark,
so even if they were all at there peak together I wouldn't run out of
memory...

If XP's paging algorithm was clever enough to not swap pages out when it was
unneccesary (when there is already about 70% memory free for example) then I
wouldn't have any problems with leaving swap space turned on. But it isn't,
so I do.
 
R

Rock

Phlip said:
(sorry if this thread appears twice, by net connection's acting up a little
today)

I have 1GB of RAM, more than I'm ever going to use, so I thought I'd turn
off the swap file on the hard drive - there'd be no need for it. However,
Task Manager still reports that my Pagefile usage is over 250MB! More
disturbingly, the Processes list still reports that everything's page
faulting, as much as it did when I still had a swap file.
So I thought maybe Windows can't survive without a swap file (for whatever
stupid reason) so I created a small swapfile on the hard drive, with min and
max both on 2MB. Unfortunately, despite the max being 2MB it still allocates
1.5GB (being the reccomended size, being 1.5x my main memory size)...

Does anyone know why either of these are happening?

I would suggest you review Alex Nichol's article on VM usage.
http://aumha.org/win5/a/xpvm.htm
 
G

Guest

Thanks for that link, it was interesting reading.

What I still don't get still is why if I have 1GB of RAM, even if it's
completely full of caching information of one kind or another, and a mere
250MB commit charge (rarely going over 512MB) Windows feels the need to
increase the pagefile size to 1.5GB (despite what I set the maximum to) -
there's only 250MB to store in it after all (putting caching information in a
swapfile defeats the purpose of caching...)
 
R

Rock

Phlip said:
Thanks for that link, it was interesting reading.

What I still don't get still is why if I have 1GB of RAM, even if it's
completely full of caching information of one kind or another, and a mere
250MB commit charge (rarely going over 512MB) Windows feels the need to
increase the pagefile size to 1.5GB (despite what I set the maximum to) -
there's only 250MB to store in it after all (putting caching information in a
swapfile defeats the purpose of caching...)

:


I'm not sure. I have 1GB of ram and use two swap files, one small one
on the C drive of 50 MB and the main one on the first partition of the
second drive. It's set to an initial size of 500 MB and a max of 2048.
Swap file usage is actually quite low, except for one program,
Netscape 7.1 with tabbed browsing. With many windows open it will on a
rare occasion need to go above the 500 MB.
 
R

Ron Martell

Phlip said:
Thanks for that link, it was interesting reading.

What I still don't get still is why if I have 1GB of RAM, even if it's
completely full of caching information of one kind or another, and a mere
250MB commit charge (rarely going over 512MB) Windows feels the need to
increase the pagefile size to 1.5GB (despite what I set the maximum to) -
there's only 250MB to store in it after all (putting caching information in a
swapfile defeats the purpose of caching...)

Windows uses the page file for a number of things:
1. Moving active memory content from RAM so as to free up that RAM for
other, more important uses.
2. To satisfy the memory address space requirements for the unused
portions of memory allocation requests. Just about everything -
Windows components, device drivers, application programs - asks for
memory allocations that are larger than what they usually need under
normal conditions. Windows uses the page file space to fulfill the
memory address space requirements of the unused portions, thereby
allowing RAM to be used only for the portion that is actually used.
3. If you have multiple users configured on the machine and if you
have "fast user switching" enabled then when you switch to a different
user name the memory content of the previous user is rolled out to the
page file.
4. Windows uses the page file on the boot drive for system failure
memory dumps. It is faster to dump to an existing file and then
rename it then it is to create a new file for the memory dump, and
speed is often essential at these times.

Hope this is of some assistance

Good luck


Ron Martell Duncan B.C. Canada
--
Microsoft MVP
On-Line Help Computer Service
http://onlinehelp.bc.ca

"The reason computer chips are so small is computers don't eat much."
 
D

David Candy

All your assumptions are wrong.Windows is designed to page. Hardware is designed to page (which is why windows is also designed). So all you do is interfere in how it is designed to work. What makes you think it throws away data that is being used. It doesn't unless there is no alternative.
 
S

StringFellow Hawk

Hint - you may have completed an "OS" course at the "local" university -
hurray for you, but I seriously doubt your professor was able to teach the
proprietary interworkings of WinXP or any Windows OS for that matter (unless
he/she was on the MS OS development team). Bill Gates and his team are very
protective of how "their" "proprietary" software - especially OS's are
concerned and tend to not let anyone know how it works - even their own
application developers are not privied to that information.
P.S. I've got 4GB of RAM, with 2GB swap files on each of two physical hard
drives - so what, I've used 2GB on each of two 400GB drives - a mere spec
compared with the vast amount of space available.
Bottom Line - just let the OS do what Bill and company designed it to do -
you may know how an OS would work in a Perfect World, but we don't have a
perfect world, so neither is the OS - it was designed and implemented by
imperfect humans.

--

StringFellow Hawk

"Dom, Give me Turbos"
Phlip said:
What makes you think I know nothing of this?
I just finished an Operating Systems course at university, so I know whereof
I speak. Of course you had no way of knowing that, but there's no reason for
you to assume I'm just some computer-illiterate moron who should blindly
trust all of Microsoft's suggestions for how my computer should run.

The problem is it will also page out used data. Any paging algorithm will do
this. Thus taking up time and disk space that could otherwise be used
elsewhere.
Swapping memory is used for one thing and one thing only: to free up memory
for other processes. But if there is less memory used than there is avaliable
(and this will always be the case - I'm not going to be using 1GB
concurrantly any time soon) then there is absolutely no need to swap out any
pages at all, they can all be held resident with no ill effects whatsoever.
Swapping them out would free memory, but that memory would not be used, and
it would only waste HDD time and space, and would cause unneccary delays and
page faults when the page needs to be read back in again.

Oh, and I have checked the peak memory usage, and even after a long time of
activity and with all the programs open that I usually do the sum of all the
"Peak Memory Usage" values in task manager still doesn't reach the 1GB mark,
so even if they were all at there peak together I wouldn't run out of
memory...

If XP's paging algorithm was clever enough to not swap pages out when it was
unneccesary (when there is already about 70% memory free for example) then I
wouldn't have any problems with leaving swap space turned on. But it isn't,
so I do.
part of the swap space forcing system critical code and data to be paged
into places like the registry files and exe files (and unused code). If the
swap was on it could page out unused data. Not to mention that you are
loosing cache space. Fonts will probably also be swapping into their files.think you know more than the designers. But you don't. You know almost
absolutely nothing. Use your computer - it is what it's there for.
 
A

Alex Nichol

Phlip said:
(sorry if this thread appears twice, by net connection's acting up a little
today)

I have 1GB of RAM, more than I'm ever going to use, so I thought I'd turn
off the swap file on the hard drive - there'd be no need for it. However,
Task Manager still reports that my Pagefile usage is over 250MB!

There is need, and Paging should not be turned off. There should be no
*activity* on the file, but it, or at least the possibility, should be
there. For why, read my page www.aumha.org/win5/a/xpvm.htm
 
A

Alex Nichol

Phlip said:
What I still don't get still is why if I have 1GB of RAM, even if it's
completely full of caching information of one kind or another, and a mere
250MB commit charge (rarely going over 512MB) Windows feels the need to
increase the pagefile size to 1.5GB (despite what I set the maximum to) -

One use it requires for a page file is to be able to use it in the event
of failure - for dumping and the like. That is why C needs to have the
*possibility* of a file, say 2 min 50 Max. If you have a file on
another drive as well, that one on C will not come into existence,
except in those failure conditions. But if you do *not* have it the
system is liable to generate an enormous file there, regardless.

You need a max on the file you have in use that is big enough for the
largest commit charge you see - and some extra. This is *potential*
use, and the amount of *actual* space needed is probably only enough for
the small amount the system likes to park in it anyway. Hence the
suggestion of Initial 100 on the file actually in use, with a big max
(having that big can do no harm). If you check in Explorer you will
almost certainly find the file grows no bigger. Values shown in Task
Manager can be very misleading
 
J

JimWae±

Alex,

I thought you should know that the size of my pagefile actually in use OFTEN
exceeds 300MB, (sometimes even gets to 500MB -- such as when running Virtual
PC).
I have 1 GB of RAM on my Dell laptop.
Upon occasion, the commit size exceeds 1200 MB.
I have both max & min set to 1535 MB.
I have lots of HD space, so I have room for such a large pagefile - and this
way it NEVER needs resizing & NEVER gets fragmented.
I do not use fast-user switching.

Jim
 
A

Alex Nichol

JimWae± said:
I thought you should know that the size of my pagefile actually in use OFTEN
exceeds 300MB, (sometimes even gets to 500MB -- such as when running Virtual
PC).

Some people will need more, it depends on the workload; all one can
suggest is a generally suitable start point and get them to adjust up if
it is necessary. Virtual PC is like FUS - it will need a lot of virtual
memory space as it has to provide all the space each of the other loaded
systems will want in addition to the needs of the system. So if you
have a second XP wanting say 400MB of working RAM and 200 or so of
pagefile commit, then you have to find that out of the VM available to
the parent system
 

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

Top