There are several different disk cache programs on the market but I discuss only SMARTDRV here, as it comes as an extra program with DOS. A cache (pronounced cash) is a buffer, a link, an intermediary storage place between the CPU and the hard disk. A primitive form of cache is buffers= in CONFIG.SYS.
SMARTDRV by default uses part of extended memory for its buffer. When the CPU needs data, it checks the cache first to see if it is there (a hit). If so, it will be read from cache, which can be 100 times faster than if the data is not in the cache (a miss) and the CPU has to get it from the hard disk. This is called reading from cache.
If the CPU is told, for example, to save a document, it will first be saved in the cache. This is writing to the cache.
If you don't know very much about this program, or don't know whether or not it is installed on your PC, type
This will not do any harm. If the program is not installed, it will just display the different options, or parameters, available.
If it is installed, it will show the start cache size in the first line and in the second line a minimum cache size while running Windows.
It also shows how many hits and misses SMARTDRV has had. The point is, of course, to get as many hits as possible, so you can try this command to see how things are going ' even while you are running Windows. Finally, it shows the drives where read and write caches are enabled.
Version 4.0 and 4.1: The following applies to version 4.0 (from Windows 3.1) and 4.1 (from DOS 6.0).
SMARTDRV loads itself in upper memory if possible. If a start size and minimum size are not stated, SMARTDRV will find out how much XMS memory to use, which works fine for most users. Drive C will be the read and write cache drive by default. The start value, or size, can also be called the disk cache size, though it only applies while running DOS programs.
With 4 MB of RAM installed, 1 MB is occupied under DOS and a minimum of 512 KB while running Windows. When Windows is loaded, it allocates extended and available upper memory for different purposes (Windows has its own memory manager.) Windows and SMARTDRV cooperate in using memory efficiently, which is why you can state a minimum size under Windows. The path line in your autoexec.bat must include the directory in which you have SMARTDRV.EXE.
SMARTDRV 1024 1024
This is an example that shows a start size and a minimum Windows size given in KB. You have to experiment to find out what is best for your own configuration. I suggest that you run with one setup for a while, change to another setup, change back again and see if you can feel any difference. Objectively, there may be a difference but if you can't feel it, it can't be that big. It is a matter of finding the right proportions.
You will have to boot between tests in order for the new sizes to become effective.
The following commands apply to all versions
Lists the different parameters.
Turns read/write cache on drive C on.
Turns read/write cache on drive C off.
Turns write cache on drive C off but leaves read cache on. If you have several drives on your hard disk, you may wish to switch off the write cache on one of the drives. This can be entered at the DOS prompt but I recommend waiting until you are sure that all activity on the hard disk has ceased to be sure that no data is left "hanging" in the cache, which leads us on to:
Forces SMARTDRV to save everything from the cache that's not already saved to disk. It is always good to give this command (in BAT files for example), especially if you or your PC change quickly from one program to another.
In the SMARTDRV 4.1 section, the DOS 6.0 manual warns: "Type SMARTDRV/C in DOS before the PC is switched off to be sure that SMARTDRV has saved all your data to the hard disk. After all activity on the disk has ceased you can turn off your computer without risk."
First tip: always exit Windows before you switch off your PC. Second tip: wait until any hard disk activity has ceased before switching off your PC.
SMARTDRV 4.2:Many users complained about losing data because, in all good faith, they had switched off their PCs too soon (before the cache had emptied to disk). As a result, Microsoft ' keeping a low profile and without any public announcement ' released version 4.2 before DOS 6.2, which, like earlier versions, still has a write cache as default but writes to disk before returning to the DOS prompt after closing a program. This facility is new! With this, the user is certain not to lose data ' although a small price is paid in the form of reduced speed.
SMARTDRV 5.0:Comes with DOS 6.2 and Win 3.11, and if it is a new installation, switches off the write cache and writes directly to disk. If the installation program finds that SMARTDRV is using a write cache, it keeps it. Ver 4.2 and 5.0 contain two new switches:
/X switches the write cache off on all drives, in other words, writes directly to disk.
/N causes SMARTDRV to wait (just like in versions 4.0 and 4.1) for the CPU to have a free moment before writing to disk. Ver. 5 supports caching on a CD-ROM drive. Assuming that you only have one drive on your actual hard disk, it is the surest and simplest way to insert the following in AUTOEXEC.BAT:
Version 4.0 and 4.1
C:\..\SMARTDRV C (This writes directly to disk.)
Version 4.2 and 5.0:
C:\..\SMARTDRV (This writes to the cache, but to disk before returning to the DOS prompt. The Win 3.11 installation inserts /X, i.e. no write cache at all.)
In all circumstances, a read cache is used (which is the most important one for making your PC run fast) and the cache writes to disk before you see the prompt. By typing smartdrv/s at the prompt, you can see which version of smartdrv you have.
Is, as the name suggests, a double buffer, which is required by certain hard-disk controllers. The AT bus doesn't need it, but some SCSI and some ESDI and MCA controllers do. The line in CONFIG.SYS
makes these controllers compatible with the type of memory created by EMM386.EXE or by Windows running in enhanced mode. The driver uses 2 KB of conventional memory and cannot be loaded into upper memory. A PC with a controller of this type needs this line in CONFIG.SYS. And how do you find out? Insert the line in CONFIG.SYS and SMARTDRV in AUTOEXEC.BAT, boot and write smartdrv /s.
If, in the "buffering" column it says yes, your PC needs the line in CONFIG.SYS. If it does not, then you can delete the line again.