Win95 is always swapping between its RAM and the hard drive's swap file, especially on 8 MB systems or systems with several programs running at once. There are many things involved , and the following information may help the masses understand what is involved, and how to keep the performance of your PC at its best.
If you let Win95 manage virtual memory, it will try to grow/shrink the swap file as required. On systems with low disk space this is actually a GOOD thing, because it does not instantly eat hard drive space. On systems with large hard drives this will become an annoyance, and the swap file will fragment, slowing down swapping, causing additional CPU overhead, and causing any further writes to the HD to also become further fragmented... and the circle continues... all this activity is called "thrashing". The thrashing that takes place, not only causes LOTS of excess CPU usage, but slows your access to the hard drive, and causes excess wear for the hard drive.
Setting the virtual memory to be "Static", does several things, first it creates a "contigious" file, and if created during the initial setup process, is located towards the outside of the drive where the surface speed of the drive is faster. A "static" file also does not require the computer to work harder to "grow/shrink" the file size, leaving more power for the task at hand.
Q: - How large should my swap file be?
A: - That is dependent on just what you use your computer for. Providing you have enough space, I generally recommend an initial setting of 50 megabytes for a "Static" swap file for a normal user that has 8-32 megs of RAM. I currently have 48megs of RAM in 1 of my 95 machines and set the swap at 100 megs, but then I run a WWW server, SMTP daemon, POP3 daemon, telnet daemon on it also. My main workstation, a P-166 WIN95 machine, has 64 megs of RAM and a 150 meg swap file and I run LOTS of apps at the same time including some very hungry Graphics apps. The NT4.0 server this Website resides on, has 64 megs of RAM and a 100 meg STATIC swap file. As a rule, the more RAM you have, the smaller the swap file can be. With todays cost of large Hard drives being low, and the need for LOTS of memory by the software on the market, a 50 meg swap file is NOT too large by any means. You will also decrease the processing time needed to swap a program in/out of virtual memory by already having enough memory available rather than creating it on the fly. In any case, I would recommend 32 megs of RAM if you can afford it on any Windows 95 machine. Remember, the recommended minimum memory for MS Word 95, is 24 megs by its self.
Caution - if you set the static swap file too small, you will get Out of Memory errors
Q: - Where should my swap file be located?
A: - Normally on the fastest hard drive in your computer. With the new dual channel PCI-EIDE controllers that are built in to the latest Pentium motherboards, you may gain an advantage by placing the swap file on a drive on the second channel, as the new board may allow something called "Peer Concurency", that allows for simaltanious access to two IDE drives on different channels.
IDE Drives:
IDE devices are known as "PIO" drives. The "Intelligence" is found on the drive itself in this case, whereas SCSI devices use the Controller for the same functions. When a READ or WRITE request is sent to an IDE drive, the "Tasking" operations are passed to the CPU on the motherboard rather than the controller. This can cause excessive CPU overhead when Windows tries to not only load a program, display graphics and access the swap file, but adjust the size of the swap file at the same time, another reason to use a "Static" swap file.
SCSI Drives:
The best choice for a "Power User" or server. With the new PCI and Bussmaster SCSI controllers, the work of READS and WRITES are NOT passed back to the CPU on the motherboard, and all drives on a "Chain" may be accessed at the same time. This leaves more CPU power for the system to perform the tasks at hand rather than waste it on I.O. tasks. A SCSI drive and controller is more forgiving when you use a "Dynamic" swap file.
For additional information on SCSI versus IDE, follow this link: - IDE or SCSI Disk
To help ease the swapping:
VCACHE - pertains to the Windows 95 version of "Smartdrive" or a harddrive "Disk Cache" that is dynamicaly sized by the OS, based on the current available memory and system needs. This "dynamic" action can again, cause extra overhead for the CPU and actually waste available memory. Machines with an abundance (48 megs and up) seem to experience a "Lag" in giving memory back to the OS from the VCACHE and you may recieve an "Out of Memory" error when there is actually alot available in the cache. This is documented in the Microsoft Knowledge Base. The MinFileCache and MaxFileCache settings below, will give you a "Static" cache when set to the same size.
1. Edit SYSTEM.INI; add this to the [vcache] section:
[vcache]
minfilecache=1024
maxfilecache=1024 (on 16 MB systems, or 512 on 8 MB systems)I use 4096 on my 48 meg machine
2. Right click on My Computer, hit Properties, hit "Performance", and go through these settings, the smaller size recommendations are for machines that have a lack of RAM:
You will find these settings give the quietest hard drives, even with disk compression used!
Author: Steven ThompsonNOTES:
Norton Navigator will cause additional disk swapping, because it maintains more shortcuts in the Start Menu which will verify that their targets exist.
Speedisk, included with Norton Utilities for Windows 95, will allow you to move your static swap file to the outside of your hard drive, where the surface speed is faster.
If you choose to let Win95 manage virtual memory, include this line somewhere in AUTOEXEC.BAT: DEL C:\WIN95\WIN386.SWP
So when your computer restarts Win95 will rebuild the swap file unfragmented.