SATA controller drivers using SiI3xxx chip have write caching enabled by default, but there is no GUI or mechanism within the operating system to enable or disabled this feature. This document identifies a registry key to control write caching for SiI3xxx drivers, and summarizes typical performance to data loss trade offs for the write cache feature.
STEP 1. Identify the IDENTIFY DATA of the hard drive connected to the host controller. There are two methods to obtain the IDENTIFY DATA of the drive; one method is during the boot up sequence, and the other is in the SATARAID Manager in Windows.
During Boot Sequence:
Wait for the RAID BIOS screen to appear, and copy down the IDENTIFY DATA as shown in the image below.
After booting into Windows, connect the drive or drives you wish to configure onto the SATA controller. Open the SATARAID5 (Array Manager) in Windows XP. Select Device from the menu at the top, then Device Summary. A window should appear showing the hard drives currently connected to your host controller. The IDENTIFY DATA should be shown in the Model list. The Silicon Image ATA controller Control Panel applet also contains the IDENTIFY DATA and firmware revision of each drive connected to the SATA controller.
STEP 2. Open Windows Registry, go to Start > Run then type regedit.
STEP 3. Select key:
where driver name has the format:
Si[r | r5]
controller id = 4 digit part number assigned to controller (ex. 3112, 3114, 3124, 3132)
(for the 680 controller this should be PnP680)
r = signifies a SATARAID driver (Legacy RAID) capable of RAID levels 0, 1, and 10
r5 = signifies a SATARAID 5 driver capable of RAID levels 0, 1, 5, and 10
If neither r or r5 is specified the driver is a non-RAID driver.
STEP 4. For the Problem devices key add a String value (right click, select string value). In the name of the value type the IDENTIFY DATA as presented by the SiI3xxx BIOS POST during start up. For differentiating between drives of the same model number, the 8 byte firmware revision of the drive can be added. The driver supports partial matching for the string value to apply the write caching changes to all drives with the specified prefix. For instance, if you added the key "Maxtor", then any drive attached to the SATA controller with an IDENTIFY data containing "Maxtor" will have the changes applied.
STEP 5. Right click on the created String value and select Modify from the pop-up menu. In the Value data field enter EnableWriteCache (to enable) or DisableWriteCache (to disable).
STEP 6. Close the Windows Registry and reboot your system.
Write Cache related trade offs
Hard disk drive write caching provides a performance improvement in exchange for increased risk of data loss in case of power out. A hard disk drive with write caching enabled responds with a completion message to a write command immediately after a write request and before data is actually written. The immediate response allows the host to proceed directly with a following write request for an overall write performance improvement. This gain comes at an increased risk of data loss in case of power out. If the hard drive disk should lose power before it completes the actual write, the cached data will be forever lost.
Because hard disk drive write caching provides sufficient performance gain without significantly increasing data loss of corruption risk, this feature should be enabled or left in the default state specified by the hard disk drive manufacturer. While write caching increases data loss risk, risk of write-related data loss or data corruption may not be avoided in case of power loss. Inherently a chance exists that the hard disk drive may lose power as the data is being written to the hard disk drive platter.
Rather than inconsequentially managing data loss risk through write caching control, use a uninterruptible power supply to prevent system power loss. UPS products will protect a host from complete power failure and allow the user to shut the system down or automatically notify the operating system to shutdown without user intervention.
Hard disk drive write caching should be controlled by troubleshoot repeated operating system or hard disk drive failure to flush write cache. Operating system have been documented to incorrectly flush write cache during shutdown. While no known problems exist within the lates patched operating system as of April 2006, future service packs or operating system releases might introduce regressions. Similarily, a possibility exists that hard disk drive firmware may incorrectly handle flush commands to write cached data to the platter. In either case, explicit control of write caching may confirm the problem and help work around the issue.