Swap file

B

Bill H.

I want to set the swap file to a disk different than the one containing the
system. This other disk is at least as fast as the system disk.

My XP Pro has 4.0 gb memory, and following the usual rules of swap file max
size equal to 2.5 times memory, gets me a max size of over 10gb. However,
Windows won't let me set a swapfile size larger than 4gb. Will that, in
this case, be sufficient? Is there a reg entry for increasing the max size?

Thx.
 
K

Ken Blake, MVP

I want to set the swap file to a disk different than the one containing the
system. This other disk is at least as fast as the system disk.

My XP Pro has 4.0 gb memory, and following the usual rules of swap file max
size equal to 2.5 times memory,


It's a terrible rule. The page file substitutes for RAM when there
isn't enough RAM. The more RAM you have, the *less* page file you
need.

gets me a max size of over 10gb. However,
Windows won't let me set a swapfile size larger than 4gb. Will that, in
this case, be sufficient?


It will be more than sufficient. Unless you run extremely
memory-hungry applications, you already have much RAM than you need,
and will probably never use the page file at all.

I would just let the system manage it and not worry about its settings
at all. Even moving it to a second physical drive (which can be good
for those with lower amounts of RAM) will not affect your performance
at all with that much RAM.

But note that if you do move it to another drive, keep a small page
file on C:

For more information, read "Virtual Memory in Windows XP" by the late
MVP, Alex Nichol, at http://aumha.org/win5/a/xpvm.htm/
 
J

Jim

Bill H. said:
I want to set the swap file to a disk different than the one containing the
system. This other disk is at least as fast as the system disk.

My XP Pro has 4.0 gb memory, and following the usual rules of swap file
max size equal to 2.5 times memory, gets me a max size of over 10gb.
However, Windows won't let me set a swapfile size larger than 4gb. Will
that, in this case, be sufficient? Is there a reg entry for increasing
the max size?

Thx.
The "usual rule" is 1.5 times the memory size, but that rule was instituted
long
before it became affordable to have 4 GB. The proper rule is "system
managed
size".

Jim
 
B

Bill H.

Yeah, but if I use "system managed size" then how do I tell the system to
use another disk?
 
L

Leonard Grey

That's easy: You need to create a partition on the second disk to hold
the swap file (at least). Once that's done, you just select that
partition in XP's Virtual Memory property sheet and select 'system
managed size'.

This next part is just my opinion, so no harm no foul if you don't agree.

For several years I had the same setup as you are proposing: I created a
2MB partition on a second internal hard disk and put my page file there.
(You may need more than 2MB.) I did this because I read - in a Microsoft
KB article among other places - that this was a way to improve your
computer's performance if the second hard disk was at least as fast as
the first and accessed less frequently than the first disk. Well guess
what? I didn't notice a da*n bit of difference. Recently, I abandoned
this setup and went back to having my swap file on the Windows
partition. Guess what? I didn't notice a da*n bit of difference.

I'm sure that having the page file on my second disk made a theoretical
difference - but not one that I was able to notice. There may be
situations under which it would make a noticeable difference, but not
for everyday computing.
 
K

Ken Blake, MVP

That's easy: You need to create a partition on the second disk to hold
the swap file (at least). Once that's done, you just select that
partition in XP's Virtual Memory property sheet and select 'system
managed size'.


If you're saying that you need to create a *separate* partition on
that second disk, just for the page file, no you don't. In fact, you
generally shouldn't. The main performance issue with the page file is
the time it takes to move the drive's read/write heads to and from it.
The way to minimize that head movement time is to put the page file on
the most used-partition of the least-used physical drive.

This next part is just my opinion, so no harm no foul if you don't agree.

For several years I had the same setup as you are proposing: I created a
2MB partition on a second internal hard disk and put my page file there.
(You may need more than 2MB.) I did this because I read - in a Microsoft
KB article among other places - that this was a way to improve your
computer's performance if the second hard disk was at least as fast as
the first and accessed less frequently than the first disk. Well guess
what? I didn't notice a da*n bit of difference. Recently, I abandoned
this setup and went back to having my swap file on the Windows
partition. Guess what? I didn't notice a da*n bit of difference.


Almost certainly because you had sufficient RAM for the applications
you run, so there was very little page file use. Page file placement
is only significant if there's a lot of page file use. That's why I
suggested to the OP in an earlier message in this thread, that with
the amount of RAM he has (4GB), it will almost certainly make no
difference at all what his page file settings are.


I'm sure that having the page file on my second disk made a theoretical
difference - but not one that I was able to notice. There may be
situations under which it would make a noticeable difference, but not
for everyday computing.


I'll bet that if you had only 128MB of RAM, the two scenarios you
describe above would show a substantial difference in performance.
 
G

Gerry

Ken

Dedicated partitions are prefereable unless you want to breed file
fragmentation.

--
Regards.

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

Ken Blake, MVP

Ken

Dedicated partitions are prefereable unless you want to breed file
fragmentation.


I think we've had this discussion before, Gerry. We disagree, but I
don't want to argue about it with you. I'll continue to post what I
believe to be correct. You are welcome to do the same.
 
G

gordon

If your system is doing little or no paging then there will be no
perceptible benefit from any tuning that you do.
If there is not a problem then don't waste any time fixing it.

If the physical RAM is larger than the working set (the RAM used by
Windows plus the applications you normally use) then minimal if any
paging will be taking place and the position and fragmentation level
of the page file is completely inconsequential.

After booting up and loading your normal applications, the status of
the RAM can be established in a minute by opening the Task Manager and
clicking the Performance tab (this description is specific to XP) :

The Physical Memory (K) box on my system right now says: Total:
916848, Available: 318312, System Cache: 442616,
so I can see that 318312 bytes of the 1GB RAM is unused (about 30%).
Every time I check it, it is about the same.
So when my system reaches normal "steady state" there is no need for
paging, everything fits into RAM.

The Commit Charge (K) box says: Total 563880, Limit: 2891056, Peak:
820080, so I see that the most RAM+page used since last bootup is
820080, less than my physical RAM, and the steady-state RAM+page in
use 577176 is well below the physical RAM.

If physical RAM is inadequate for your working set then a RAM upgrade
is far better than a well-tuned paging setup as, to give a quote from
the Microsoft technical article in the link below, "physical RAM can
be almost one million times faster than a hard disk" :
http://blogs.msdn.com/ntdebugging/archive/2007/10/10/the-memory-shell-game.aspx

If you do need to indulge in paging then, as has been said above, your
page file should be on your fastest HD together with a set of your
least accessed files.
If you are limited to one HD then the page file should be on the outer
edge (fastest part) together with your most highly accessed other
files (this would normally be accomplished by creating a partition on
the outer edge) in order to minimize seek time (the slowest action of
hard disk access by far).

The directory files (folders) which are often deeply nested in modern
Windows installations should be close to the page file and all files
on this partition need to be kept at a very low level of
fragmentation.
 

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

Swap file 2
swap or paging file size for best performance 3
swap file 5
Virtual Memory Annoyance 2
Maximum virtual memory size 3
Parts for my new build 10
windows xp 2gb ram -swap file 7
Insufficient memory 1

Top