Smartdrv command

Updated: 11/12/2023 by Computer Hope
smartdrv command

SMARTDrive (smartdrv) is a utility that can be loaded in the autoexec.bat to create a disk cache in conventional memory or extended memory. This utility is used boot disks as it can greatly increase the speed of how MS-DOS accesses disk drives.

Note

Those who are using Microsoft Windows instead of MS-DOS should not load this line in the autoexec.bat or while Windows is running. Users running Microsoft Windows 95 or 98 cannot load this command unless they are in an MS-DOS shell.

Availability

Smartdrv is an external command that is available for the following Microsoft operating systems as smartdrv.exe.

Smartdrv syntax

Installs and configures the SMARTDrives disk-caching utility.

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 the caching options on specific drive(s). The specified drive(s) 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 (compact disc read-only memory) 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 (extended memory specification) memory (KB) for the cache.

Extended memory InitCacheSize value
1 MB or less All
1 MB to 2 MB 1 MB
2 MB to 4 MB 1 MB
4 MB to 6 MB 2 MB
6 MB or more 2 MB
WinCacheSize Specifies XMS memory (KB) for the cache with Windows. If this option is not specified, smartdrv will default the wincachesize to the amount of extended memory available. Below is a basic chart of what will be set.

Extended memory WinCacheSize value
1 MB or less 0
1 MB to 2 MB 256 KB
2 MB to 4 MB 512 KB
4 MB to 6 MB 1 MB
6 MB or more 2 MB
/E:ElementSize Specifies how many bytes of information to move at one time.
/B:BufferSize Specifies the size of the read-ahead buffer.

Smartdrv examples

c:\dos\smartdrv.exe /x

This command is to be placed in the autoexec.bat. It loads the smartdrv utility into memory, allows access to SMARTDrive, and disables the write-behind caching for all drives.

c:\dos\smartdrv.exe C 1024 512

Specifies a size to be used with smartdrv. When a cache size is not specified, smartdrv uses all extended or expanded memory.