Previous Section  < Day Day Up >  Next Section

Hack 56 Avoid the Delayed-Write-Caching Blues

figs/beginner.gif figs/hack56.gif

This Windows performance enhancer could make you a real loser, of your data. Make this simple tweak and compute with peace of mind.

In an effort to give us another performance boost, Windows provides the ability to cache (store in memory for later use) data that is to be written to your hard drives, writing the data only when the system is less busy. This feature puts your data at risk for some short period of time and can result in data being lost if the system crashes or the power fails before the data is safely transferred from memory to the disk drive. Write-caching is not a bad thing unless you live where power fluctuates or fails frequently. Admittedly the time window affecting this risk is very short, a second or two at most, but you cannot control when a power glitch will happen in that second or two to cause data loss.

If your PC gets power from an uninterruptible power supply, especially one that can tell Windows that power is failing so it can do a proper shutdown, you probably don't need or want to use this hack.

Write-caching, or delayed writing, is enabled by default in all versions of Windows. We have to take deliberate steps to turn it off.

To remove the risks of delayed-write-caching for Windows 95/98/Me, follow these steps:

  1. Go to Start, select Settings, select Control Panel, and double-click the System icon.

  2. In the System Properties dialog select the Troubleshooting tab.

  3. In the Troubleshooting tab dialog click the "File System..." button. The File System Properties dialog, shown in Figure 5-18, will appear.

    Figure 5-18. Troubleshooting holds the key to write-behind caching
    figs/pchk_0518.gif


  4. To disable this risky feature, click on the box labeled "Disable write-behind caching for all drives" and then click OK.

  5. Restart your system.

To disable delayed-write-caching under Windows 2000, XP, and 2003, follow these steps:

  1. Double-click My Computer, right-click on the drive you want to change the settings for, and then select Properties.

  2. In the Properties dialog, select the Hardware tab.

  3. Highlight the listing for the disk you will make this change for and then click the Properties button.

  4. In the Properties dialog for this drive, select the Policies tab.

  5. In the Policies dialog (Figure 5-19), the "Enable write caching on the disk" checkbox is marked by default; click it to disable the feature.

    Figure 5-19. The write-caching controls for Windows 2000 and XP
    figs/pchk_0519.gif


  6. Click OK to close all the dialogs, and then restart your system.

Write-caching does boost your performance, but it is best to use it only if you have a very stable system and are running your PC on an uninterruptible power supply with automatic shutdown of Windows enabled. It's a good idea to enable the Self-Monitoring, Analysis, and Reporting Technology (S.M.A.R.T.) capabilities in your BIOS [Hack #57] .

    Previous Section  < Day Day Up >  Next Section