|
| Swap
File & Virtual Memory |
| |
| |
There
are two possible advantages of a permanent Swap
File:
|
|
-
A
reserved contiguous, un-fragmented section of the
HD.
-
Eliminates
disk activity from W9x re-sizing the Swap-File.
NOTE: Be
wary of some myths about the Swap-File passed on
by well meaning folks nearly every time this subject
comes up. I am surprise at how many seemingly knowledgeable
people are perpetuating one or both of these myths
in some of the popular PC Magazines, W9x help books
and many websites.
Swap-File
myth #1:
Create a permanent swapfile 2+ times the amount of physical
memory.
Fact:
Virtual memory (Swap-File) is a substitute for physical
memory. Common sense tells you the more physical
memory you have, the less virtual memory you need.
Conversely (all other things being equal) the less
physical memory you have the more virtual memory
you will need. There is no reasonable "rule of thumb" formula
for setting the size of a permanent Swap-File.
Swap-File
myth #2:
Set the 'min' and 'max' size the same for the Swap-File.
This
one can cause you grief, it is bad advice!!! Some
seem to think of the Swap-File like an insect trap,
if you don't have a lid on it, all of those Ks and
Ms of bytes and bits will fly out all over the HD.
Not so!!! It may help to think of your Swap-File
as a water glass sitting on the table (The level
within this container will rise and fall as demands
change and it is emptied whenever you shut W9x off),
the only time it will overflow is if you try to put
more into it than it can hold, (your 'min' size setting)
and that is the reason you 'never' want to place
a 'max' size for your Swap-File, you want it to overflow
if it needs to. (This is an analogy, it will not
overflow, the Swap-File will increase in size if
need be, possibly using non contiguous HD space until
it shrinks to your 'Min' size setting again.) W9x
will 'never' exceed your 'min' size unless it needs
to, if it can't (because of a 'max' size setting)
it will revolt, usually with a "Out of Memory!! Shut
down one or more programs to continue" warning. It
is doubtful you will associate this warning with
the 'max' setting you placed on your Swap-File months
ago when your usage habits were less demanding.
How
to determine the optimum size for YOUR 'Permanent
Swap-File'?
You
can install System Monitor from the Windows 98 CD
or simply download from here System
Monitor,
click on the file you've downloaded called sysmon.exe,
then open the extracted folder and click on sysmon.exe
to start the System Monitor program. Then, click
Edit, Add Item, Select Memory Manager, then Swapfile
size and finally click OK.
Let
System Monitor run in the background for a few hours
or all day while you do your work, open multiple
programs, browse the net, etc. Try to ignore the
fact that System Monitor is running in the background.
Then at the end of day check to see the peak value
of your swapfile. You can check the peak by
clicking on the graph of the swapfile and looking
at the bottom of the System Monitor which will show
your peak value.

Here's
the trickier part, the peak value is reported in
kilobytes and we need to convert to megabyte. Take
your peak value and divide by 1,024,000, and you'll
have the peak value of your swapfile in megabytes. This
will be the setting for your min value.
Where
to put your 'Permanent Swap-File'?
I
suggest placing it on your fastest HD, on the Partition
with the most free space. If you have a motherboard
that supports dual channel PCI-EIDE controllers,
you may gain an advantage by placing the swap file
on a second drive on the second channel as the your
board may allow "Peer Concurrency" that allows
for simultaneous access to two IDE drives on different
channels. Preparation for 'Permanent Swap-File' installation.
Use the method that works best for you. The point
is to have no Swap-File, or an empty Swap-File when
you Defragment the drive you want your 'Permanent
Swap-File' on. (1) Open Control Panel/System Properties/Performance/Virtual
Memory, click "Let me specify my own Virtual Memory
settings". From the 'Hard Disk' selection window
select any Drive Letter other than the one you want
your 'Permanent Swap-File' on. Click "OK" then "YES" to
the scary warning. Reboot your system to W9x. From
START/FIND type in Win386.swp, search the drive you
will want your 'Permanent Swap-File' on. If 'Win386.swp'
is present, delete it. (2) If you have >16M of
memory this method will probably work for you. Be
sure the 'min' setting for virtual memory is 'zero'.
Make sure you do not have any programs that run at
start-up, check with CTRL+ALT+DEL to be sure ('Systray'
and 'Explorer' are usually all you need) reboot as
many times as necessary to be sure Win386.swp is
an empty file. Reboot your system to W9x, from START/RUN
type DEFRAG, select and defragment the drive you
want your 'Permanent Swap-File' on. An Even better
way to defragment your hard drive is to use Power
Defrag. You won't have to worry about the above or
making sure any programs or screen savers are running
in the background. Power Defrag does it all for you
and makes backups and then restores any files that
it changes. Power Defrag is NOT a third-party defragger,
it uses the Windows built in defrag utility but optimizes
the settings to give you the best possible defragmentation.Download Power Defrag Open
Control Panel/System Properties/Performance/Virtual
Memory, click "Let me specify my own Virtual Memory
settings". From the 'Hard Disk' selection window
select the Drive Letter you want your 'Permanent
Swap-File' on. In the 'Minimum' window type in the
size you have determined for your system (make NO
changes in the 'Maximum' window). Click "OK" then "YES" to
the scary warning, reboot your system. If you check
your 'Virtual Memory' settings you will notice that "Let
Windows manage my virtual memory settings" is checked,
this is normal. You will see that your 'Hard disk'
selection and 'Minimum' settings show what you entered,
'Maximum' will show free space on HD or 'No Maximum'
and all is grayed out, this is normal.
This
next tip is for Windows98/98SE only:
To
disable the "PageFile_Call_Async_Manager" feature
that allows the Memory Manager to asynchronously
write out swap file buffers during VFAT idle times.
This reverts swap file usage back to Windows 95 style,
and forces the use of the computer's physical memory
(faster) first, before the use of the slower hard
disk virtual memory (swap file) and reduces hard
drive thrashing. You'll need to edit your system.ini
file by selecting Start, Run and type in system.ini. Once
open scroll down to the section entitled [386Enh].
Create an open line below the title [386Enh] and
type the following:
ConservativeSwapfileUsage=1
Now
save the file and reboot your system.
|
|
|
|
|
|