Home > Commands N-Z > Commands S

SMARTDRV


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Starts or configures SMARTDrive, which creates a disk cache in extended memory. A disk cache can significantly speed up the operating system's 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.

CAUTION:
SMARTDrive will not load after Windows has started.


Syntax

When starting SMARTDrive from your AUTOEXEC.BAT file or from the command prompt:

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

Once SMARTDrive is running:

SMARTDRV [/X] [[drive2[+|-]]...] [/C | /R] [/F | /N] [/Q | /S]

To view the current status after SMARTDrive has loaded:

SMARTDRV


Parameters
drive1: ( path v5.0 Win95)
Specifies the location of the SMARTDRV.EXE file.
[[drive+|-] (v5.0 Win95)
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 DriveSpace caches compressed drives, see Notes.)
InitCacheSize (v5.0 Win95)
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 (v5.0 Win95)
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 table shows what the default values for InitCacheSize and WinCacheSize will be, depending on the amount of available extended memory your computer has.
        Extended Memory  InitCacheSize        WinCacheSize
        Up to 1 MB       All extended memory  Zero (no caching)
        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
        Extended Memory  InitCacheSize        WinCacheSize

Switches
/B:BufferSize (v5.0 Win95)
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 /E:ElementSize. The larger the value of BufferSize, the more conventional memory SMARTDrive uses.
/C (v5.0 Win95)
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.)
/E:ElementSize (v5.0 Win95)
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.
/F (v5.0 Win95)
Writes cached data after each command completes. This is the default value.
/L (v5.0 Win95)
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.
/N (v5.0 Win95)
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.
/Q (v5.0 Win95)
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.
/R (v5.0 Win95)
Clears the contents of the existing cache, including writing all write-cached information to disk, and restarts SMARTDrive.
/S (v5.0 Win95)
Displays additional information about the status of SMARTDrive.
/U (v5.0 Win95)
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 drive2:+|- parameter.
/V (v5.0 Win95)
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.
/X (v5.0 Win95)
Disables write-behind caching for all drives. You can then enable caching for individual drives by using the drive2:+|- parameter.

Related

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.


Notes
Enabling write caching on specific drives

By default, the operating system 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:

    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 the operating system, 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:

    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 the operating system 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.


Examples

To create a SMARTDrive disk cache and use the default cache size, add the 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 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:

    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 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:

    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.


Errorlevels

none.


Availability
External
DOS
v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23 v7.00 v7.0R1 v7.10 v8.00
Windows
Win95 Win98 WinME
Windows NT
none