Reducing Disk-Access Timeout in Windows (Especially for Removable Media)?

Whenever a bad volume (dying hard-disk, scratched CD, bad flash-drive/memory-card, etc.) is accessed, Windows tends to wait an excruciatingly long time (a minute or two?) before giving up and returning a read error.

Worse, Windows tends to practically hang while it attempts to read the bad media. For example, if you put a bad CD in and open the folder, it will try to read the files, but if it can’t the Explorer window with the CD folder open (and possibly other parts of Windows) will be inaccessible and frozen for a long time until Windows (finally) decides it can’t read the disc.

How can this timeout be reduced? (No, this has nothing to do with network-mapped drives.)

The closest I could find was mention of the TimeOutValue value in HKLM\SYSTEM\CurrentControlSet\Services\Disk, but there is little information on whether it applies to removable media or to non-server editions of Windows.


Solution 1:

The Windows Storage Team updated this blog post in 2012 discussing the Disk timeout value, which is located at HKLM\SYSTEM\CurrentControlSet\Services\Disk like you mentioned.

Particularly relevant are these quotes (emphasis mine):

Why not just set it to 1 second? I don’t want to wait that long:

Keep in mind that the disk.sys timeout value is a global setting. If you were to set it to 1 second, this would mean that it would also have the effect of allowing only 1 second to spin up a drive which is asleep before reporting a timeout on the device.

It’s also important that this value be set high enough when using systems which are not only using SAN storage. For example, if you were to set the timeout value to 5 seconds on Windows Client operating systems where a SAN is not connected, you would likely see timeout errors which were not actually a problem, such as when a DVD or local disk are spinning up after being asleep.

With a little additional research, I came to the conclusion that this Registry entry:

  • is applicable to both client and server editions of Windows
  • affects the timeout period of all storage devices in the system, removable or fixed
  • is created by default in Vista (Ultimate), 7 (Ultimate), and Server 2008 R2 (it probably is in 8, but I haven't checked).
  • can be created in Server 2000, 2003, 2008 and 2012 (credit to @DarthAndroid)
    • This may mean that the key can be created in XP and have an effect on the time-out value.