On 14 Jun 00, at 8:41, Barbara wrote:
> I have a Gateway Select 750, 30GB HD, 128MB Ram, Windows 98SE,
> IE5, OE. I am puzzled about the size of a file in Windows named
> Win386.swp. I know it is a swap file, but the size ranges from
> 73,000KB to 90,000KB. Is this normal? Seems like an astonishing
> size to me. I have tried to find information on it in the Windows
> Knowledge Base, but can't seem to find anything that tells me why
> it is so huge.
Windows *could* only add to the swap file when it needs to swap
something out to disk. That seems like a simple way to do it, but in
fact it means that a pretty complicated task, which could fail, would
get done repeatedly during execution of a given program.
The simpler and faster way to manage the file is to allocate space
in it at the same time as swappable memory is allocated -- this
guarantees that when something needs to be swapped, Windows already
knows where it will swap it out to.
The "down sides" of this are:
1. Space will be allocated for everything swappable in memory, even
though it may never be needed.
2. A full hard drive can lead to an "out of memory" error message --
the attempt to allocate memory failed, and the user interface has no
way to know that it failed when trying to allocate swap space on disk.
NOTE:
If your swap file is growing and shrinking, it's also fragmented,
and defragmenting the swap file is a challenge in its own right.
(Depending on the OS and tools available, it could be impossible.)
This tends to slow things down over time.
You can prevent this by a couple of measures:
1. The swap file cannot become more fragmented if it doesn't grow
and shrink. You can take over managment from Windows and specify a
minimum and maximum size that are the same, a "fixed" rather than
"dynamic" swap file.
2. The fixed swap file is guaranteed not to be fragmented if you
allocate it on a partition that isn't used for anything else. On
most of my machines, you'll find a partition labelled "SWAP"....
David G
PCSOFT's List Owner's:
Bob Wright<[log in to unmask]>
Drew Dunn<[log in to unmask]>
|