
Microsoft SMARTDrive Disk Cache version 5.0
Copyright 1991,1993 Microsoft Corp.

SMARTDRV [/X] [[drive[+|-]]...] [/U] [/C | /R] [/F | /N] [/L] [/V | /Q | /S]
         [InitCacheSize [WinCacheSize]] [/E:ElementSize] [/B:BufferSize]

/X              Disables write-behind caching for all drives.
drive           Sets caching options on specific drive(s). The specified
                drive(s) will have write-caching disabled unless you add +.
+               Enables write-behind caching for the specified drive.
-               Disables all caching for the specified drive.
/U              Do not load CD-ROM caching module.
/C              Writes all information currently in write-cache to hard disk.
/R              Clears the cache and restarts SMARTDrive.
/F              Writes cached data before command prompt returns (default).
/N              Doesn't write cached data before command prompt returns.
/L              Prevents SMARTDrive from loading itself into upper memory.
/V              Displays SMARTDrive status messages when loading.
/Q              Does not display status information.
/S              Displays additional information about SMARTDrive's status.
InitCacheSize   Specifies XMS memory (KB) for the cache.
WinCacheSize    Specifies XMS memory (KB) for the cache with Windows.
/E:ElementSize  Specifies how many bytes of information to move at one time.
/B:BufferSize   Specifies the size of the read-ahead buffer.

 
  
                                  SMARTDRV 
  
Starts or configures SMARTDrive, which creates a disk cache in extended 
memory. A disk cache can significantly speed up MS-DOS disk operations. When 
used for disk caching, SMARTDrive is loaded by using the SMARTDRV command in 
your AUTOEXEC.BAT file or at the command prompt. 
  
SMARTDrive can also perform double buffering, which provides compatibility 
for hard-disk controllers that cannot work with memory provided by EMM386 or 
Windows running in 386 enhanced mode. To use double buffering, load the 
<SMARTDRV.EXE> device driver by using a DEVICE command in your CONFIG.SYS 
file. 
  
SMARTDrive will not load after Windows has started. 
  
Syntax 
  
When starting SMARTDrive from your AUTOEXEC.BAT file or from the command 
prompt, use the following syntax: 
  
    [drive:][path]SMARTDRV [/X] [[drive[+|-]]...] [/U] [/C|/R] [/F|/N] [/L] 
    [/V|/Q|/S] [InitCacheSize[WinCacheSize]] [/E:ElementSize] 
    [/B:BufferSize] 
  
Once SMARTDrive is running, use the following syntax: 
  
    SMARTDRV [/X] [[drive[+|-]]...] [/C|/R] [/F|/N] [/Q|/S] 
  
To view the current status after SMARTDrive has loaded, use the following 
syntax: 
  
    SMARTDRV 
  
Parameters 
  
[drive:][path] 
    Specifies the location of the SMARTDRV.EXE file. 
  
[[drive+|-] 
    Specifies the letter of the disk drive for which you want to control 
    caching. Include the plus (+) sign to enable caching for the specified 
    drive; include the minus (-) sign to disable caching for that drive. You 
    can specify multiple disk drives. 
  
    If you specify a drive letter without a plus or minus sign, read-caching 
    is enabled and write-caching is disabled. If you specify a drive letter 
    followed by a plus sign (+), read-caching and write-caching are enabled. 
    If you specify a drive letter followed by a minus sign (-), both 
    read-caching and write-caching are disabled. If you don't specify a 
    drive letter, floppy disk drives, CD-ROM drives, and drives created 
    using Interlnk are read-cached but not write-cached, hard disk drives 
    are both read-cached and write-cached, and network drives and Microsoft 
    Flash memory-card drives are ignored. (For information about how 
    DoubleSpace caches compressed drives, see Notes.) 
  
InitCacheSize 
    Specifies the size in kilobytes of the cache when SMARTDrive starts 
    (when Windows is not running). The size of the disk cache affects how 
    efficiently SMARTDrive runs. In general, the larger the cache, the less 
    often SMARTDrive needs to read information from the disk, which speeds 
    up your system's performance. If you do not specify an InitCacheSize 
    value, SMARTDrive sets the value according to how much memory your 
    system has (see the table below). 
  
WinCacheSize 
    Specifies, in kilobytes, how much SMARTDrive will reduce the cache size 
    for Windows. When you start Windows, SMARTDrive reduces the size of the 
    cache to recover memory for Windows' use. When you quit Windows, the 
    cache returns to its normal size. WinCacheSize specifies the smallest 
    size to which SMARTDrive will reduce the cache. The default value 
    depends on how much available memory your system has (see the table 
    below). If you specify a value for InitCacheSize that is smaller than 
    the value specified for WinCacheSize, InitCacheSize is set to the same 
    size as WinCacheSize. 
  
The following table shows what the default values for InitCacheSize and 
WinCacheSize will be, depending on the amount of available extended memory 
your computer has. 
  
Extended         InitCacheSize        WinCacheSize 
Memory 
 
  
Up to 1 MB       All extended         Zero (no caching) 
                 memory 
  
Up to 2 MB       1 MB                 256K 
  
Up to 4 MB       1 MB                 512K 
  
Up to 6 MB       2 MB                 1 MB 
  
6 MB or more     2 MB                 2 MB 
  
Switches 
  
/X 
    Disables write-behind caching for all drives. You can then enable 
    caching for individual drives by using the drive+|- parameter. 
  
/U 
    Does not load the CD-ROM caching module of SMARTDrive even if you have a 
    CD-ROM drive. If SMARTDrive is loaded with the /U switch, you cannot 
    enable CD-ROM drive caching. If SMARTDrive is loaded without the /U 
    switch, you can disable or enable caching individual CD-ROM drives using 
    the drive+|- parameter. 
  
/C 
    Writes all cached information from memory to cached disks. SMARTDrive 
    writes information from memory to the disk at times when other disk 
    activity has slowed. You might use this option if you are going to turn 
    off your computer and want to make sure all cached information has been 
    written to the disk. (SMARTDrive writes all cached information to the 
    disk if you restart your computer by pressing CTRL+ALT+DELETE, but not 
    if you simply turn off the power or press your computer's reset 
    button.) 
  
/R 
    Clears the contents of the existing cache, including writing all 
    write-cached information to disk, and restarts SMARTDrive. 
  
/F 
    Writes cached data after each command completes. This is the default 
    value. 
  
/N 
    Writes cached data when the system is idle. When the command prompt 
    returns, not all cached data may be written yet. To ensure that all the 
    cached data is written, use the /C switch. 
  
/L 
    Prevents SMARTDrive from automatically loading into upper memory blocks 
    (UMBs), even if there are UMBs available. You can use the /L switch if 
    upper memory is enabled for use by programs. If you are using 
    SMARTDrive's double-buffering feature and your system appears to be 
    running slowly, try adding the /L switch to the SMARTDrive command in 
    your AUTOEXEC.BAT file. 
  
/V 
    Instructs SMARTDrive to display status and error messages when it 
    starts. (By default, SMARTDrive does not display any messages unless it 
    encounters an error condition.) The /V switch cannot be used in 
    conjunction with the /Q switch. 
  
/Q 
    Instructs SMARTDrive not to display status messages when it starts. (By 
    default, SMARTDrive does not display status messages when loading, but 
    does for most other operations.) If SMARTDrive encounters an error while 
    starting, it displays an error message whether or not it was loaded with 
    the /Q switch. The /Q switch cannot be used in conjunction with the /V 
    switch. 
  
/S 
    Displays additional information about the status of SMARTDrive. 
  
/E:ElementSize 
    Specifies in bytes the amount of the cache that SMARTDrive moves at a 
    time. Valid values are 1024, 2048, 4096, and 8192. The default value is 
    8192. The larger the value, the more conventional memory SMARTDrive 
    uses. 
  
/B:BufferSize 
    Specifies in bytes the size of the read-ahead buffer. A read-ahead 
    buffer is additional information that SMARTDrive reads when an 
    application reads information from the hard disk. For example, if an 
    application reads 512K of information from a file, SMARTDrive then reads 
    the amount of information specified by BufferSize and saves it in 
    memory. The next time the application needs to read information from 
    that file, it can read it from memory instead. The default size of the 
    read-ahead buffer is 16K (16384 bytes). Its value can be any multiple of 
    ElementSize. The larger the value of BufferSize, the more conventional 
    memory SMARTDrive uses. 
  
Caution:  Check that SMARTDrive has completed all write-caching before you 
          restart  or turn off your computer. (This is not necessary if you 
          restart your computer by pressing CTRL+ALT+DELETE.) To have 
          SMARTDrive write all cached information to cached disks, type 
          SMARTDRV /C at the command prompt. After all disk activity has 
          stopped, you can safely restart or turn off your computer. 
  
                                       

 
  
                              SMARTDRVNotes 
  
Enabling write caching on specific drives 
  
By default, MS-DOS Setup configures SMARTDrive so that write-caching is 
disabled. This configuration is extremely safe, but does not provide optimum 
speed. After SMARTDrive starts, you can use the SMARTDRV command to enable 
write caching on specific drives. This can significantly speed up your 
system. To enable write-caching on a particular drive, carry out the 
SMARTDRV command and specify the drive letter and a plus sign. For example, 
to enable write-caching on drive C, you would type the following: 
  
    smartdrv c+ 
  
For information about enabling write-caching for compressed drives, see 
"SMARTDrive and Compressed Drives" later in this help topic. 
  
Using extended memory 
  
For SMARTDrive to use extended memory, your CONFIG.SYS file must contain a 
DEVICE command for HIMEM.SYS or another extended-memory manager that 
conforms to the Lotus/Intel/Microsoft/AST eXtended Memory Specification 
(XMS). 
  
Loading SMARTDrive into the upper memory area 
  
If the upper memory area is available through MS-DOS, SMARTDrive will 
automatically load into upper memory. You do not need to use the LOADHIGH 
command with SMARTDrive. 
  
If your hard disk requires double buffering, SMARTDrive may run faster if 
its cache is located in conventional memory. To load SMARTDrive into upper 
memory and its cache in conventional memory, use the following command: 
  
    loadhigh smartdrv /l 
  
SMARTDrive and compressed drives 
  
SMARTDrive does not actually cache compressed drives; instead, it caches the 
physical (host) drive on which the compressed volume file is located. This 
improves the speed of both the physical drive and the compressed drive. 
  
SMARTDrive and CD-ROM drives 
  
If you are using a CD-ROM drive and you want to cache it, load MSCDEX before 
you load SMARTDrive. If you do not want to cache the CD-ROM drive, load 
SMARTDrive with the /U switch. (Note that MS-DOS Setup adds the SMARTDRV 
command to the beginning of your AUTOEXEC.BAT file, before any other 
commands.) 
  
To find out whether SMARTDrive is caching your CD-ROM drive, type SMARTDRV 
at the command prompt. 
  
                                       

 
  
                             SMARTDRVExamples 
  
To create a SMARTDrive disk cache and use the default cache size, add the 
following command to your AUTOEXEC.BAT file: 
  
    c:\dos\smartdrv 
  
Example: A typical SMARTDrive command 
  
Suppose you want to create a disk cache with a cache size of 2048K, and 
ensure that Windows will not reduce the size of the cache to less than 
1024K. To do this and to specify that the SMARTDRV.EXE file is located in 
the DOS directory on drive C, add the following line to your AUTOEXEC.BAT 
file: 
  
    c:\dos\smartdrv 2048 1024 
  
Example: Enabling and disabling caching on specific drives 
  
Suppose that SMARTDrive is already running and you want to enable write 
caching on drive C. To do this, type the following at the command prompt: 
  
    smartdrv c+ 
  
Suppose you want to configure SMARTDrive to disable all caching of your 
floppy-disk drives and enable write caching on Interlnk drive D. (Interlnk 
drives, like floppy-disk drives, are not write-cached by default because 
it's possible to lose access to the drive before all information has been 
written from the cache). To do this, you would add the following command to 
your AUTOEXEC.BAT: 
  
    c:\dos\smartdrv a- b- d+ 
  
Example: Saving cached information on the hard disk 
  
Before pressing your computer's reset button or turning off your computer, 
it is a good idea to have SMARTDrive write all cached information from 
memory to any cached disks. To do this, type the following at the command 
prompt: 
  
    smartdrv /c 
  
You will not need to use this command before restarting your computer by 
pressing the CTRL+ALT+DELETE keys: SMARTDrive detects the CTRL+ALT+DELETE 
key sequence and automatically writes all information to cached disks before 
allowing the system to restart. 
  
                                       

 
  
                       SMARTDRV.EXEDouble Buffering 
  
Loads the SMARTDRV.EXE device driver to perform double buffering. Double 
buffering provides compatibility for certain hard-disk controllers that 
cannot work with memory provided by EMM386 or Windows running in 386 
enhanced mode. To find out whether you need to use double buffering, see 
<SMARTDRV.EXENotes>. 
  
SMARTDrive can also perform disk caching, which can speed up your computer. 
To use SMARTDrive for disk caching, add the <SMARTDRV> command to your 
AUTOEXEC.BAT file. 
  
To use the double-buffering feature of SMARTDrive, the SMARTDRV.EXE device 
driver must be loaded by a <DEVICE> command in your CONFIG.SYS file. 
  
Syntax 
  
    DEVICE=[drive:][path]SMARTDRV.EXE /DOUBLE_BUFFER 
  
Parameters 
  
[drive:][path] 
    Specifies the location of the SMARTDRV.EXE file. 
  
/DOUBLE_BUFFER 
    Instructs SMARTDrive to perform double buffering. 
  
                                       

 
  
                            SMARTDRV.EXENotes 
  
Double buffering and conventional memory 
  
SMARTDrive's double-buffering component must be loaded in conventional 
memory. It uses 2K of conventional memory, and cannot be loaded in upper 
memory. 
  
The SMARTDrive disk cache can use either upper memory or conventional 
memory. For more information, see <SMARTDRVNotes>. 
  
Determining whether you need to use double buffering 
  
If you use EMM386 or run Windows in 386 enhanced mode, you may need to use 
double buffering. Double buffering is most commonly required with an SCSI 
(small computer system interface) hard disk or other device, but can also be 
necessary with an ESDI (enhanced system device interface) or MCA 
(microchannel architecture) device. 
  
Most hard disks do not need to use double buffering. If you are not sure 
whether your hard disk needs double buffering, follow these steps: 
  
1  Add the following command to your CONFIG.SYS file if the file does not 
   already contain such a command: 
  
       device=c:\dos\smartdrv.exe /double_buffer 
  
   This command must appear before the DEVICE command that starts EMM386, if 
   any. 
  
2  Add the following command to your AUTOEXEC.BAT file if the file does not 
   already contain such a command: 
  
       c:\dos\smartdrv 
  
3  Run the MemMaker program if you haven't already done so. 
  
4  Use the MEM /C /P command to confirm that upper memory is in use. 
  
5  At the command prompt, type SMARTDRV and then press ENTER. 
  
   SMARTDrive displays information about your system. 
  
6  Look at the column labeled "Buffering." If any line in this column reads 
   "yes," you need to run the double-buffering component of SMARTDrive. (If 
   your system seems to be running slowly, try adding the /L switch to the 
   SMARTDRV command in AUTOEXEC.BAT.) 
  
   If every line in the "Buffering" column says "no," you can remove the 
   DEVICE command for SMARTDRV.EXE from your CONFIG.SYS file. 
  
   If any line in the "Buffering" column contains the character "-", then 
   SMARTDrive is unable to detect whether double buffering is needed. Use 
   the MEM /C /P command to confirm that programs are located in upper 
   memory. 
  
                                       

 
  
                           SMARTDRV.EXEExample 
  
Suppose you need to use SMARTDrive's double-buffering feature so that you 
can use EMM386 to gain access to the upper memory area. To enable double 
buffering, you would add the following command to your CONFIG.SYS file: 
  
    device=c:\dos\smartdrv.exe /double_buffer 
  
To improve your computer's speed, you could also install the SMARTDrive disk 
cache by adding the following line to your AUTOEXEC.BAT file: 
  
    c:\dos\smartdrv /l 
  
                                       

