DillyDally said:
I have two internal HDs. Using "control panel" (System) I have the paging
file set for the second HD ("S") with Windows managing the file size.
However, I happened to notice a 1.5gb "pagefile.sys" file sitting on the
first HD ("C").
Can I file be deleted or should I just set the paging file for the "C" drive ??
There must always be a pagefile in the same partition as from where
Windows was loaded. This is to ensure there is a pagefile for Windows
to use. What would happen if you unpowered the 2nd hard disk? What
would happen if you unmounted the 2nd hard disk? What would happen if
you replaced the 2nd hard disk? There would be no pagefile (and Windows
requires one).
Using "system managed" sizing for the pagefile will lead to its
fragmentation. Set the min and max size to the same value, like double
your RAM size. Reboot. Then use SysInternals' PageDefrag to defragment
the pagefile and other system files, like the registry. This requires a
reboot since the defrag must be done at an early stage of Windows load.
Thereafter your pagefile remains defragmented. Define the SAME min=max
size on both drives (on different hard disks). Windows will show
preference in using the pagefile in the non-Windows partition; however,
if that non-Windows partition becomes unavailable, you will still have
the recommended pagefile size in the Windows partition.
Personally I don't always set max pagefile space to 1.5 or 2.0 times the
size of RAM. After 2GB of RAM, I just set the virtual memory to the
same size as the RAM. So with 2GB of RAM, I set the pagefile to 2GB.
If I'm using other drives (which must be partitions on different hard
disks) to include pagefile space, I would set it to 2GB on the 2nd drive
and also 2GB on the first drive (for Windows). Although that looks to
double the size of the pagefile space, Windows will use the 2nd drive's
pagefile first (except for some system processes in the 1st pagefile).
Some folks use a smaller pagefile in the Windows partition since Windows
will prefer to use the pagefile in the non-Windows partition. However,
I'd rather not have to think about doing any virtual memory
reconfiguration at some later time if the 2nd hard disk gets replaced or
during some testing when, say, the controller for that 2nd drive must be
disabled in the BIOS, or for whatever reason the 2nd hard disk
disappears. Logically you can make the Windows partition pagefile
smaller and rely on the larger non-Windows partition pagefile. I just
keep it simple and make the pagefile the same size (and with min=max) in
both partitions.
If using multiple pagefiles, they must be in different partitions on
different hard disks. The point of the alternate pagefile location is
to alleviate file access on the same hard disk for paging and system
file access. That's good except if both hard disks are on the same
controller. Reads can only be addressed to one device on the controller
at a time. Some overlap is achieved between read and writes (i.e.,
during a write, a read can take place). So you might also want to
ensure the 2nd hard disk is on a different controller (i.e., not on the
same cable as the 1st hard disk). Separate pagefiles in different
partitions reduces file access conflicts through the operating system's
file system. Further that by eliminating hardware-level access
conflicts between the 2 disks by having the disks on different
controllers.
System managed, or with min and max not being the same value, means that
the max value is a reserved value. That space is not used until needed.
But when it is needed, there may be other files in the way so the
pagefile cannot grow into contiguous sectors hence it gets fragmented.
The larger you make the pagefile, the more likely that there isn't
enough contiguous free space to provide for a single fragment pagefile
(i.e., you may not get the pagefile defragmented). So don't make it
overly large. It is, after all, a reserve for when you run out of real
or physical memory which is far faster. If you are having to increase
your pagefile to accomodate some pig of a program that wants a lot more
memory than you have for physical RAM then it's time to get more
physical RAM installed in your host.
While there have been many articles arguing that using a 2nd pagefile
(in a non-Windows partition on a different hard disk) will speed up the
OS due to reduction in file system conflicts, I've yet to see anyone
giving cold statistics to prove the same. There is also a registry hack
to keep the Exec for Windows loaded more in real memory (i.e., not allow
it to page out to the slower virtual memory or pagefile) and yet I've
read some technical articles that shows it offers no speedup. After
all, it is no uncommon to see a mix of different brand of hard disks
within the same host, or a mix of IDE and SATA disks. You could be
putting the 2nd pagefile on a slower hard disk which would obviate the
professed speedup of reducing the file system conflicts for the pagefile
in the same partition as Windows. That is, you try to speed up Windows
with a 2nd pagefile on a different hard disk to reduce file system
conflicts but that other disk might be the slower device.
If you have plenty of real RAM, don't concern yourself as to where is
the pagefile. Real RAM is always better than pagefile space no matter
where is that pagefile space (and even if you put it on a flash drive
because flash memory is far slow than system memory, plus it can die
catstrophically and you lose all pending data changes that were in the
pagefile).