Optimum Swap File Size with 4G of RAM

W

Walter_Slipperman

I have Vista Home Premium 64 and 4G of RAM.

I have set up my 750G drive with 1 primary drive for Vista, 1 primary for
XP, 1 primary for an alt OS, and then 1 extended drive that contains 1
logical drive for Vista swap, 1 logical drive for XP swap and the remaining
large logical drive for Data.

I have set the swap drives to be 4G each because it seems to me that they
won't need to be as large as the otherwise suggested two or three times the
RAM because I figure with that much RAM I shouldn't find myself using
virtual memory. As far as I know I don't do things that require hugh
amounts of memory, like photo and video editing.

- Is it a mistake to have the virtual memory (the swap file) approximately
the size of the RAM even when I have a lot of RAM?

-- I assume that I can use Disk Management to increase the size of the swap
drives at the expense of making other drives smaller. If I do want to
increase the size of the swap drive how would I make sure that the Data
drive is the drive that is being shrinked to accomodate this?

--- If there is data on the Data drive (there is none yet) how do I insure
that the swap drive gets an efficient section of the Data drive if it eats
into it?

---- And does XP behave the same way with this issue, because I also have a
4G swap drive for it?

////Walter////
 
T

the wharf rat

- Is it a mistake to have the virtual memory (the swap file) approximately
the size of the RAM even when I have a lot of RAM?

No. In fact, the real/swap ratio should go down as the amount of
real memory rises.

The old rule of thumb was 2x real memory. As real ram amounts
increased and thus decreased the need for paging this moved to swap size
should equal ram size. Certain operating systems use swap space as temp or
scratch space and motivate you to allocate extra swap. Windows doesn't
do that AFAIK.
 
J

John Smith

1st of all you dont need to put a swap file on each drive
2nd 32 bit OS's cannot access of handle chunks of memory either ram or
virtual that are bigger
than 4 gigs..

making partitions for virtual memory (pagefiles) is stupid unless you put
the pagefile on a SECOND drive

thus the smartest thing to do is to make a FIRST partition of a very fast
second or third drive that is not used for other things much, and put it
there.. the only reason for the parition is to ensure that it wont be
fragmented.. and that its located in the outer rims of the disk where the
speed of the disk is maximum thus it can provide faster data flow

But really all this is crap.. you wont see much difference.. if you want
speed first of all, you should avoid vista (the worst OS microsoft has made
since windows ME) that is 50% slower than XP in everything...
 
H

HeyBub

Walter_Slipperman said:
I have Vista Home Premium 64 and 4G of RAM.

I have set up my 750G drive with 1 primary drive for Vista, 1 primary
for XP, 1 primary for an alt OS, and then 1 extended drive that
contains 1 logical drive for Vista swap, 1 logical drive for XP swap
and the remaining large logical drive for Data.

I have set the swap drives to be 4G each because it seems to me that
they won't need to be as large as the otherwise suggested two or
three times the RAM because I figure with that much RAM I shouldn't
find myself using virtual memory. As far as I know I don't do things
that require hugh amounts of memory, like photo and video editing.

- Is it a mistake to have the virtual memory (the swap file)
approximately the size of the RAM even when I have a lot of RAM?

-- I assume that I can use Disk Management to increase the size of
the swap drives at the expense of making other drives smaller. If I
do want to increase the size of the swap drive how would I make sure
that the Data drive is the drive that is being shrinked to accomodate
this?
--- If there is data on the Data drive (there is none yet) how do I
insure that the swap drive gets an efficient section of the Data
drive if it eats into it?

---- And does XP behave the same way with this issue, because I also
have a 4G swap drive for it?

The optimum amount of a swap file is contingent on the applications running
at the time. For ordinary, piddly, things, virtual memory may be virtually
unused. When really pushing the machine, lots of paging may be required for
efficient use. That's why it's usually best to let the system manage the
file - it can do so dynamically.
 
W

Walter_Slipperman

HeyBub said:
The optimum amount of a swap file is contingent on the applications
running at the time. For ordinary, piddly, things, virtual memory may be
virtually unused. When really pushing the machine, lots of paging may be
required for efficient use. That's why it's usually best to let the system
manage the file - it can do so dynamically.

Do you think that it doesn't make sense to make a swap partition and I
should just let Vista do it on the Vista partition?
 
T

the wharf rat

making partitions for virtual memory (pagefiles) is stupid unless you put
the pagefile on a SECOND drive

Hmmm...

"The optimal solution, other than the solution of adding more physical
memory, is to do the following:

1. Create one paging file on the boot partition by using the
default settings.
2. Create another paging file on a less frequently used partition
on a separate physical disk or RAID volume.
You can create additional paging files for each separate physical disk or
RAID volume. "

Quoting the KB, BTW.
But really all this is crap.. you wont see much difference.. if you want

You won't see any difference unless you work with a lot of
very large processes frequently (IE video editing) or switch users a lot.
All the stuff about drive layout optimization is also IMHO pointless. The
few milliseconds you might gain is lost in the noise.
 
T

the wharf rat

unused. When really pushing the machine, lots of paging may be required for
efficient use. That's why it's usually best to let the system manage the
file - it can do so dynamically.

Oh, gosh, no. Allowing dynamic page file management is bad for
a couple of reasons:

1. Growing and shrinking the pagefile is simply unneseccary
overhead

2. It leads to fragmentation of the page file.
 
T

the wharf rat

Do you think that it doesn't make sense to make a swap partition and I
should just let Vista do it on the Vista partition?

The only reason to have a pagefile on the boot partition is to
get kernel dumps. The reason to put it on a seperate partition is that it
allows more efficient use of the boot file system. The reason to put it on
a seperate drive is that few IDE controllers are capable of intelligent
queueing so paging interferes with data access.

That being said, if you just pick a nice static size, like 2GB,
and leave it wherever windows puts it you probably will never notice any
small performance penalty over some complicated location scheme...
 
W

Walter_Slipperman

So should I just forget about the swap partition and delete that partition?
And then just let Vista do Virtual Memory with it set to "Automatically
manage paging file size for all drives"?

The whole idea of setting up swap drives was recommended to me by a guy who
helped with the initial hard drive partitioning when I was first setting up
the computer. I'm really not trying to tweak every last bit of performance
from the system. I just want something that is easily manageable. I could
delete the partition (and the XP swap partition too that I've set up for a
multi-boot system) and free up some space for my Data partition or the Vista
partition. What do you suggest?

\\\\Walter\\\\
 
T

the wharf rat

So should I just forget about the swap partition and delete that partition?
And then just let Vista do Virtual Memory with it set to "Automatically
manage paging file size for all drives"?

No.

You had the right idea. A fixed size pagefile approximately
equal in size to the physical ram size and on a seperate drive from the
boot drive if possible.

Dynamic pagefile management is counterproductive as is carefully
trying to position the pagefile in any certain cylinder. Leaving the
pagefile on the boot partition is probably a noop for an ordinary desktop
user.
 
J

John Smith

you want my honest advice?

Just leave it to automatic and forget about it..

if you want to get more perfomance just add more ram and/or a readyboost
flashdrive
 
W

Walter_Slipperman

the wharf rat said:
No.

You had the right idea. A fixed size pagefile approximately
equal in size to the physical ram size and on a seperate drive from the
boot drive if possible.

Then I'm back to the question - how do I tell it that a particular partition
is supposed to be used as the location for the pagefile? In the Virtual
Memory settings window it lists all the drives:

c: = system managed
d: = 1000 - 3773 *
e: = none
f:: = none
g: = none

* this is the swap file. It says 3773 MB available. I have set it to 1000
for Initial Size and 3773 for Maximum size. and the window in front of it,
the Performance Options window says that I have Total paging size for all
drives = 5394 MB. That would mean to me that I have 1621 MB ( i.e.
5394 -3773 = 1621) of page file on the c: system managed drive. Is that
what I want? (I think I'm not up to speed on your explanations.)

\\\\Walter\\\\
 
T

the wharf rat

Then I'm back to the question - how do I tell it that a particular partition
is supposed to be used as the location for the pagefile? In the Virtual

Your requirements for the swap partition seem to be:

MUST be large enough to hold your minimum sized swap file (looks
to be 2GB)
SHOULD not be on the same drive as the boot partition

It looks to me like "D:" meets those requirements, so IMHO you
should set a fixed size pagefile on partition D: of at least 2GB and
not more than 3.7GB. Remember to tell windows NOT to put a partition on C:
or it will do so anyway.

Because Windows *always* knows what you eant better than you
do, lol :)
 
W

Walter_Slipperman

the wharf rat said:
Your requirements for the swap partition seem to be:

MUST be large enough to hold your minimum sized swap file (looks
to be 2GB)
SHOULD not be on the same drive as the boot partition

It looks to me like "D:" meets those requirements, so IMHO you
should set a fixed size pagefile on partition D: of at least 2GB and
not more than 3.7GB. Remember to tell windows NOT to put a partition on
C:
or it will do so anyway.

Because Windows *always* knows what you eant better than you
do, lol :)

Okay. Now I get it. By setting the C: to "No paging file" and having
values set for the D: I have placed the pagefile on to D: partition. And I
have bumped up the Initial Size from 1000 up to 2000, and have the Maximum
size set to 3773. Thanks for your help. Now I move on to the regedit
tweak that I wamt to do to remove the D: from general view - mentioned in
another thread that I posted this morning. Once again thanks for your
help, everyone.

\\\\Walter\\\\
 

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

Hot Swap drives 6
Swap file size 6
swap file 1
How do I hide my Swap Drives? 4
Vista and Memory 15
eliminating the swap file 18
partitioning a large drive 11
swap file 5

Top