Keeping the swapfile in a separate partition

  • Thread starter Thread starter alegator
  • Start date Start date
A

alegator

I've read that you can increase Windows performance by keeping the swapfile
in a separate partition. I can easily create an extended partition using say
Partition Magic, but then how do I tell Windows to assign the swapfile to
that new partition? Thanks.
 
Hi,

Control Panel/System/advanced, click on performance settings. On the
advanced tab, click the "change" button under virtual memory - you can
change your settings here.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Associate Expert - WindowsXP Expert Zone

Windows help - www.rickrogers.org
 
larry2002 said:
I've read that you can increase Windows performance by keeping the swapfile
in a separate partition. I can easily create an extended partition using say
Partition Magic, but then how do I tell Windows to assign the swapfile to
that new partition? Thanks.

If you keep the swap file on another physical drive you will get better
performance when using it. If you have to put it on the same physical
drive as your OS, then you should set the swap to a fixed size, about 2
x RAM, and don't let it increase/decrease - this will keep it from
fragmenting (you need to defrag your drive before you increase the size
or you will fragment the swap file).
 
In
alegator said:
I've read that you can increase Windows performance by keeping
the
swapfile in a separate partition.


Sorry, but you've read wrong. This is not a good idea, and can
hurt your performance rather than improving it,. What it does is
move the page file to a location on the hard drive distant from
the other frequently-used data on the drive. The result is that
every time Windows needs to use the page file, the time to get to
it and back from it is increased.
Putting the swap file on a second *physical* drive is a good
idea, since it decreases head movement, but not to a second
partition on a single drive. A good rule of thumb is that the
page file should be on the most-used partition of the least-used
physical drive. For almost everyone with a single drive, that's
C:.

If you have enough RAM, the penalty for doing this may be slight,
since you won't use the page file much, but it won't help you.

Also, the other problem with a separate partition like this is
that you run the risk of making it too small, in which case
programs will fail for lack of virtual memory, or too large,
which is wasteful of disk space. If you leave it on C:, it can
expand or contract as needed.
 
Thanks everyone for their answers. I currently have 2Gb of RAM and have the
paging file assigned to a MAX and MIN values of 4096MB. Is this fine?. Also,
when I run Diskeeper the drive map shows the paging file is segmented in two
big chunks, one close to the begnning of the drive and the other one close
to the end. Is there a way to place ALL of the paging file at the beginning
of the drive, or at the end? what's best? thanks.
 
In
alegator said:
Thanks everyone for their answers. I currently have 2Gb of RAM
and
have the paging file assigned to a MAX and MIN values of
4096MB. Is
this fine?


No, it's almost certainly *much* more than you need. The more RAM
you have, the *less* page file you need. It depends on what apps
you run, but with as much as 2GB, you will probably hardly ever
need to use the page file. You should have a small initial
size--perhaps 100MB or 200MB--and leave the maximum large if it
ever needs to expand.

Also, when I run Diskeeper the drive map shows the paging
file is segmented in two big chunks, one close to the begnning
of the
drive and the other one close to the end. Is there a way to
place ALL
of the paging file at the beginning of the drive, or at the
end?


It doesn't much matter, but if you made the initial size much
smaller, it would very likely accomplish this.
 
alegator said:
I've read that you can increase Windows performance by keeping the swapfile
in a separate partition. I can easily create an extended partition using say
Partition Magic, but then how do I tell Windows to assign the swapfile to
that new partition? Thanks.

It is not a good idea if the partition is to be made on the same hard
disk. That just about guarantees that you will increase seek times in
getting to it, and seeks are the slowest part of disk access. If it is
on a physically separate drive mechanism it makes sense in principle.
See more at may page www.aumha.org/win5/a/xpvm.htm
 
alegator said:
Thanks everyone for their answers. I currently have 2Gb of RAM and have the
paging file assigned to a MAX and MIN values of 4096MB. Is this fine?.

Very wasteful of disk space. You will hardly be using the file at all,
other than as a place to assign pages not yet brought into use after
programs have asked for the allocation (and many ask for much more than
they need). I would set initial 100 and max maybe 1000 to cover that
point. The idea that page file should be a multiple of RAM - *any*
multiple - is plain wrong and makes no sense at all in a single user
system like windows. It is an old rule of thumb from Multi-user Unix,
where it did make sense
 
Very wasteful of disk space. You will hardly be using the file at all,
other than as a place to assign pages not yet brought into use after
programs have asked for the allocation (and many ask for much more than
they need). I would set initial 100 and max maybe 1000 to cover that
point. The idea that page file should be a multiple of RAM - *any*
multiple - is plain wrong and makes no sense at all in a single user
system like windows. It is an old rule of thumb from Multi-user Unix,
where it did make sense

I run a computer in a single user environment and edit large graphics
files all the time. When the swap file is set to vary between X & Y the
computer takes ages to INCREASE from X to Y. With the swap file setup on
another physical drive, and set to 2 X RAM, it made a LARGE difference
in performance. With 2GB of RAM, the swap, on a single drive system,
should be set to about 1GB fixed size, in an unfragmented space, to
allow for anticipated use of the swap area - if the user is running
memory intensive apps (which 2g of RAM might indicate), then a 2gb or
4gb fixed size swap area might be reasonable.

My news reader will use 1GB of ram from time to time, it's amazing at
how much RAM non-business apps can use.
 
Leythos said:
I run a computer in a single user environment and edit large graphics
files all the time. When the swap file is set to vary between X & Y the
computer takes ages to INCREASE from X to Y. With the swap file setup on
another physical drive, and set to 2 X RAM, it made a LARGE difference
in performance. With 2GB of RAM, the swap, on a single drive system,
should be set to about 1GB fixed size, in an unfragmented space, to
allow for anticipated use of the swap area - if the user is running
memory intensive apps (which 2g of RAM might indicate), then a 2gb or
4gb fixed size swap area might be reasonable.


How much physical RAM do you have? It still is a bad idea, even on a separate physical drive to have the PF setup at even the same initial size as the actual physical RAM available, unless you don't mind wasting space. I have 2g of RAM, with the PF on a separate physical drive set @150min/900max. I can see that my swap file is only using 7mgs of actual physical memory when I am running Windows, even using a lot of normal apps. I can edit a 650mg WAV file in Sound Recorder (which will take oodles of memory), and my PF usage only goes up to 11mgs usage, and I still have 1.2gs of RAM to be used when needed! As you can see, the swap file really didn't come into play.
My news reader will use 1GB of ram from time to time, it's amazing at
how much RAM non-business apps can use.

I would get another NR if I were you; that doesn't sound correct. I use OE, and the biggest it ever got was 25-30mgs!
 
Ken, I got this answer from a friend of mine who is a Software Engineer at
GM:

"Hi Ale, I would really love to have a face to face chat with some of
these Microsoft Engineers and question them and find out how much do
they really know, the reason you set the minimum equal to the maximum
is to keep the pagefile together in one space so it dosent start
looking for other space to use on the hard drive, letting a pagefile
grow and shrink will fragment a hard drive like a shrapnel grenade not
to mention Windows can a will make mistakes by sometimes placing pieces
the paged file out side of your allotted area and the only way to fix
that is to have a separate partition for the pagefile, Windows OS works
like a pig the more you feed it the more it will eat, with Windows the
more Ram you put in the more it will use, there are ways to restrict
Windows from using to much ram and it requires very in-depth registry
editing and knowledge of hexadecimal editing, if you make a separate
partition of 4 gig and set the minimum to 4gig and the max to 4 gig you
will have contained the fragmentation problem windows gives and plenty
of room for ram to dump unused files to pagefile, as for the Microsoft
Engineer, he sould of asked you many more questions before recommending
you run a 200 mg pagefile as I wish I could have chatted with him so I
can yell at him, Microsoft considers most home users as average users
and will offer advice based on the average user in order to keep their
asses out of hot water and they will not get into architecture of
Windows because he most likely does not know architecture of Windows
and to find that out you must go to their high level support and pay
alot of money for that support.
If you do setup a separate partition and decide to make it 4 gig the
partition must have 15% usable space left on it as you will get disk
warnings all the time if you dont, such as 3450 megs min and 3450 max,
just go to your defragmenter and make sue it says 15% free space."
 
Ken, I got this answer from a friend of mine who is a Software Engineer at
GM:

"Hi Ale, I would really love to have a face to face chat with some of
these Microsoft Engineers and question them and find out how much do
they really know, the reason you set the minimum equal to the maximum
is to keep the pagefile together in one space so it dosent start
looking for other space to use on the hard drive, letting a pagefile
grow and shrink will fragment a hard drive like a shrapnel grenade not
to mention Windows can a will make mistakes by sometimes placing pieces
the paged file out side of your allotted area and the only way to fix
that is to have a separate partition for the pagefile, Windows OS works
like a pig the more you feed it the more it will eat, with Windows the
more Ram you put in the more it will use, there are ways to restrict
Windows from using to much ram and it requires very in-depth registry
editing and knowledge of hexadecimal editing, if you make a separate
partition of 4 gig and set the minimum to 4gig and the max to 4 gig you
will have contained the fragmentation problem windows gives and plenty
of room for ram to dump unused files to pagefile, as for the Microsoft
Engineer, he sould of asked you many more questions before recommending
you run a 200 mg pagefile as I wish I could have chatted with him so I
can yell at him, Microsoft considers most home users as average users
and will offer advice based on the average user in order to keep their
asses out of hot water and they will not get into architecture of
Windows because he most likely does not know architecture of Windows
and to find that out you must go to their high level support and pay
alot of money for that support.
If you do setup a separate partition and decide to make it 4 gig the
partition must have 15% usable space left on it as you will get disk
warnings all the time if you dont, such as 3450 megs min and 3450 max,
just go to your defragmenter and make sue it says 15% free space."
 
In
alegator said:
Ken, I got this answer from a friend of mine who is a Software
Engineer at GM:


If "Software Engineer at GM" is meant to impress me, I'm sorry to
say that it doesn't. There are software engineers and there are
software engineers. Some of them know what they are talking about
and some of them don't don't. I'm impressed by knowledge, not
titles, and I'm sorry to say that your friend hasn't demonstrated
much knowledge in what he sent you.

And bear in mind that many of us here are, or have been, Software
Engineers too.

"Hi Ale, I would really love to have a face to face chat with
some of
these Microsoft Engineers


First, bear in mind that I am not a Microsoft Engineer. I don't
work for Microsoft, and neither does anyone else here with the
title "Microsoft MVP." The MVP is an honorary award, given to
those who have consistently supplied correct information.

and question them and find out how much do
they really know, the reason you set the minimum equal to the
maximum
is to keep the pagefile together in one space so it dosent
start
looking for other space to use on the hard drive, letting a
pagefile
grow and shrink will fragment a hard drive like a shrapnel
grenade not
to mention Windows can a will make mistakes by sometimes
placing
pieces the paged file out side of your allotted area and the
only way
to fix that is to have a separate partition for the pagefile,
Windows
OS works like a pig the more you feed it the more it will eat,
with
Windows the more Ram you put in the more it will use, there are
ways
to restrict Windows from using to much ram and it requires very
in-depth registry editing and knowledge of hexadecimal editing,
if
you make a separate partition of 4 gig and set the minimum to
4gig
and the max to 4 gig you will have contained the fragmentation
problem windows gives and plenty of room for ram to dump unused
files to pagefile, as for the Microsoft
Engineer, he sould of asked you many more questions before
recommending you run a 200 mg pagefile as I wish I could have
chatted
with him so I can yell at him, Microsoft considers most home
users as
average users and will offer advice based on the average user
in order to keep their
asses out of hot water and they will not get into architecture
of
Windows because he most likely does not know architecture of
Windows
and to find that out you must go to their high level support
and pay
alot of money for that support.


I wish your friend had studied some English along with his
computer studies. His 314-word run-on sentence is very hard to
read. Moreover it is filled with inaccuracies and simple errors.
As a single example of an egregious error, he says " and plenty
of room for ram to dump unused files to pagefile." Windows does
not dump *files*, unused or not, to the page file.

Because the page file is not typically accessed sequentially,
fragmentation of the page file is not an important issue. For
more important, from a performance standpoint, is the time taken
by head movement; that's the slowest part of disk I/O. Moreover,
with your 2GB of RAM, unless you run some *very* memory-hungry
applications, it is highly unlikely that you will ever use the
page file at all.

Read "Virtual Memory in Windows XP" by MVP Alex Nichol, at
http://aumha.org/win5/a/xpvm.htm There's excellent information
there.
 
alegator said:
"Hi Ale, I would really love to have a face to face chat with some of
these Microsoft Engineers and question them and find out how much do
they really know, the reason you set the minimum equal to the maximum
is to keep the pagefile together in one space so it dosent start
looking for other space to use on the hard drive, letting a pagefile
grow and shrink will fragment a hard drive like a shrapnel grenade not
to mention Windows

Go read my page www.aumha.org/win5/a/xpvm.htm. While they cannot of
course officially endorse it I know it is well regarded among the
developers.

Windows has not dynamically grown and shrunk the page file since win95.
If it needs more space than the present file provides it will increase
it, but if the demand then reduces it will not shrink. One exception -
if the released space is right at the end of the file, it may release
this space. But it is *not* wasting time in dynamic reorganisation.

So the answer to those who want a contiguous file is to set the initial
size big enough to cover all normal needs. On a large RAM this is
likely to be pretty small. And certainly on a large RAM it will not
need to be anything like 1.5 times RAM - whereas on a really small 128
MB that is most likely not enough.

But you want the max size bigger to cover contingencies and to provide a
parking place for memory allocations that have been given to programs
but never brought into use. In XP those do *not* need physical file at
all
 
Leythos said:
I run a computer in a single user environment and edit large graphics
files all the time. When the swap file is set to vary between X & Y the
computer takes ages to INCREASE from X to Y. With the swap file setup on
another physical drive, and set to 2 X RAM, it made a LARGE difference
in performance. With 2GB of RAM, the swap, on a single drive system,
should be set to about 1GB fixed size, in an unfragmented space, to
allow for anticipated use of the swap area

IF the user is doing the sort of workload that you are. The size of
page file (and the need for RAM) is very much a function of workload.
But that does not mean that the sizes needed for that load should be
taken as the start point for a general user. I have a 768 MB RAM and an
initial size page file of 100 MB - and it is extremely rare for it to
get bigger.
 
Leythos said:
I run a computer in a single user environment and edit large graphics
files all the time. When the swap file is set to vary between X & Y the
computer takes ages to INCREASE from X to Y. With the swap file setup on
another physical drive, and set to 2 X RAM, it made a LARGE difference
in performance

A further point there. In that sort of workload it seems very likely
that you use PhotoShop. That is notorious for grabbing a large chunk
of page file away from the system to manage for itself. This is a
deplorable approach - it ought to use its own private work file - but
has to be recognised
 
A further point there. In that sort of workload it seems very likely
that you use PhotoShop. That is notorious for grabbing a large chunk
of page file away from the system to manage for itself. This is a
deplorable approach - it ought to use its own private work file - but
has to be recognised

Photoshop has it's own swap file that it creates, if you follow the
directions, which few do - it tells you to create it on a different
physical disk in unfragmented space.

The point about Windows Swap space is that it's hardly a general thing
any more to suggest a size. In my case, when I setup systems, I always
set it to a fixed size on every computer - 512MB for small systems or
1GB for larger systems, and 2GB for places where I think the user will
need the extra swap. There comes a point in time where no amount of
additional swap space will help - where the machine is just swapping all
the time for everything and it grinds to a halt.

The generic 2xRAM is a good place to start on machines that have enough
free space to handle it, at least 1xRAM is the min on machines I setup.
 
Leythos said:
Photoshop has it's own swap file that it creates, if you follow the
directions, which few do - it tells you to create it on a different
physical disk in unfragmented space.

Not only that, but by default, it allocates (on 6.0 and higher) 50% of system memory to itself when in use. I set mine down to 5% which is 100mgs, and is more than enough for it. Even if you follow the Scratch Disk advice, the memory needed would still make it very slow if one has 256megs RAM or less. No matter, it still has to use memory, and note it uses the term "free memory", which is reality, doesn't exist..

From PS help file:

" When your system does not have enough RAM to perform an operation, Photoshop and ImageReady use a proprietary virtual memory technology, also called scratch disks. A scratch disk is any drive or a partition of a drive with free memory. By default, Photoshop and ImageReady use the hard drive that the operating system is installed on as its primary scratch disk. "
 
Great reply from this guy on the news group, he gets very defensive
slightly, and he didnt bother pointing out whats wrong with my
suggested pagefile setup, he started picking on my title, obviously it
bothered him, where is this news reader maybe Ill go there and start
picking on him just for fun, thats for the heads up Ale,by the way Im
not with GM Im with Daimler Chrysler, the fact he did not pick up on
keeping the min pagefile being the same size as the max and putting the
swapfile on a different partition gives me a good idea about these
guys, go to this site and read up on the tweaks and file systems, here
is a link to the pagefile stuff and there is more on the site, this guy
who runs the site is very good.
http://www.blackviper.com/AskBV/XP17.htm
 
Good Grief, Charlie Geeks. :)

I just purchased a 120 GB HD for 33 cents a GB.
You guys are debating wheater to use 10, 15 or 25 cents worth of disk space
for the page file. lol

Make it 1.5X the RAM and be done with it. The world has bigger issues, and
so does XP, MAC X, Linux, and even your Mr. Coffee machine!

SJ
 
Back
Top