(913) 381-9118 Voice/FAX
http://www.datasmithpayroll.com
E-Mail: paymail@datasmithpayroll.com

LPI Information Systems
DATASMITH Software Sales & Service
10020 Fontana; Overland Park, KS 66207-3640

Return to Payroll Central
Return to Payroll News Page 1

HOW TO TURN OFF WRITE-BEHIND CACHING IN WINDOWS xx

WHY WRITE-BEHIND CACHING SHOULD BE TURNED OFF: Turning off Write-behind caching is one of the two most important things that you can do to help ensure that your files will not become scrambled by the operating system.

This is especially important when running programs which allow more than one user to access the same disk file data simultaneously or which access a record more than once within a relatively short time period. Word processing programs and spreadsheets generally cannot access a file any faster than the operator can type in relatively long commands directing them to do so. However, database programs, even when used by only one operator on a single workstation, frequently allow several different parts of the program to access the same file, or make repeated accesses to the same file within a very short time.

An example would be a billing program, which would typically allow access to a Customer file by Accounts Payable, Order Entry, and Customer File Maintenance simultaneously. With "Write-behind Caching" enabled, it would be possible for the Order Entry module to get different Customer information from the Accounts Payable module, resulting in a "can't find this client" or a "missing transaction" error when billing is later attempted.

Similarly, when Payroll updates an Employee Record to note that a check has been issued, it is extremely important that the next Payroll module which reads the data file gets the updated Employee Record so that it does not erroneously assume that the employee has not been paid. This can happen only if all updated records are written to the disk immediately, so that all programs will read the same version of the data record at all times.

Disk Caching programs which are allowed to "hold" data records cannot always recognize that another program, or even another part of the same program needs the updated version of the data. Also, during the time a Disk Caching program is "holding" an updated data record, any momentary power interruption or any error in the system or any application which causes a temporary interruption in processing can cause the updated data record to be irrecoverably lost without any warning or operator notification.

There have been claims that "Write-behind Caching" feature (Microsoft also calls the feature "Lazy Write") improves perfomance.  The perfomance improvement was always very, very small: much too small to be noticeable for business applications.  And if you are using modern disk drives which contain their own full-track buffer, there will be NO performance improvement.   Virtually all PATA, SATA, and USB drives purchased since 2005 have a built-in full-track (or larger) buffer.  In any case the recovery time you will spend the first time you experience data corruption due to "Write-Behind Caching"  will wipe out at least 10 years of any performance time "savings."

HOW TO TURN WRITE-BEHIND CACHING OFF IN WINDOWS 95/NT/98/ME/2000:

1. From the DeskTop select the "Start" Button.

2. From the menu that appears, select "Settings".

3. From the second menu that appears, select "Control Panel".

4. In the resulting window, double click on "system". This displays the "System Properties" window.

5. In the "System Properties" window, select the "performance" tab.

6. At the bottom of the Performance tab select "File System".

7. In the resulting "File System Properties" window, the "Hard Disk" tab will be displayed. Ensure that the two items shown on this tab are set as follows:

a. "Typical role of this machine:" should be set to "DeskTop computer". If it is not, then left click on the down-pointing arrow and select "DeskTop computer".

b. "Read-ahead optimization:" should be set to the "full" or right-most position. If it is not, then left-click on the pointer and, holding the left mouse button down, drag the pointer to the "Full" (right-most) position. Then release the mouse button.

c. If you have changed any of the settings on this tab, then left-click the "Apply" button on the bottom of this window to save the changes.

8. You are still in the "File System Properties" window.

a. Left-click on the "Troubleshooting" tab. Ensure that the "Disable write-behind caching for all drives" box has a check mark in it. If this box already has a check mark in it, then Write-behind caching is already turned off. Select "OK" and then "Close" to exit the properties setup windows. You do not have to complete the remaining directions in this section.

b. If "Disable write-behind caching for all drives" does not have a check mark then, place the pointer (cursor) over the box to the left of the appropriate line and left click the mouse. A check mark will appear in the box. If the check mark does not appear then left click on the box until it does. NOTE: DO NOT CHANGE ANY OTHER SETTINGS ON THIS TAB. DOING SO COULD CAUSE MAJOR PROBLEMS WITH YOUR SYSTEM.

c. Left click on "Apply".

d. Left click on "OK". The "File System Properties" window will disappear.

e. Left click on "OK" again. The "File System Properties" window will disappear.

f. Left click on "OK" again. The "System Properties window will disappear.

g. Windows will display a message stating that you must restart your computer before the new settings will take effect and ask if you want to restart the computer now. Select "Yes" to restart the computer now. Write-behind caching is now turned off. Close the "Control Panel" window by left clicking on the"X" in the upper right-hand corner of the window.

HOW TO TURN WRITE-BEHIND CACHING OFF IN WINDOWS XP:

1. From the DeskTop select the "Start" Button.

2. From the menu that appears, select "Settings".

3. From the second menu that appears, select "Control Panel".

4. In the resulting window, double click on "system".

5. In the resulting window, click on the 'Hardware' tab (at the top of the window), then click on the 'Device Manager' button.

6. Expand the 'Disk Drives' icon, then right-click each drive individually:

7. Select Properties.

8. On the 'Policies' tab, UN-check the box labeled 'Enable write caching on the disk.' This turns this dangerous feature off on the selected drive.

Repeat steps 7-8 for each drive in your system. Windows XP does not prompt you to reboot after completing this change.

HOW TO TURN WRITE-BEHIND CACHING OFF IN WINDOWS 7:

1. From the DeskTop select the "Start" Button.

2. On the menu that appears, right-click "Computer" and select "Properties".

3. In the left pane, click "Device Manager."

4. In the list of devices, expand "Disk Drives," right-click on a disk drive, and click "Properties."

5. Click the "Policies" tab and Un-Check "Enable Write Caching on the device."  This turns this dangerous feature off on the selected drive

Repeat steps 4-5 for each drive in your system. Windows 7 does not prompt you to reboot after completing this change.

ALL WINDOWS SYSTEMS:

If ANY drives are found to have 'Write Delay Caching' or 'Write Caching' enabled we strongly recommend that you perform the following after changing this setting:

  1. Close all applications and then Restart your system.
  2. Run ScanDisk (START->Programs->Accessories->System Tools->ScanDisk) and allow ScanDisk to fix any problems found (there usually WILL be problems if Write Caching has been used).  On Windows XP or Windows 7, run "CHKDSK /F" from a Command prompt instead of running ScanDisk.
  3. Reboot again. At this point, your file system directories should be 'clean' so that your programs should run properly unless the program files have been corrupted.   If you suspect that your program files are corrupt, restore your programs by reinstalling them in accordance with the instructions for your program.