The SMB_COM_FLUSH command makes sure that all data and allocation information for the corresponding file has been written to stable storage. A response is not sent to the client until the writes are complete. However, two factors may contribute to unnecessarily poor server performance:
- Many client programs flush files more frequently than is required. Client programs should flush files only when this is necessary for data consistency. Too many data flushes slow the performance of the file server because the flushes interfere with the server's ability to optimally schedule disk activity.
- Programs that are running on the server do not know that it is sufficient to leave the data in the memory of the file server. If the file server is sufficiently reliable, it may be acceptable to keep file data stored in the memory of the file server. In this case, the memory on the file server is considered stable storage, but the programs are not aware of it.
After you apply and configure this software update, the following behavior changes occur:
- The memory on the file server itself is treated as stable storage.
- The SMB Service immediately responds to SMB_COM_FLUSH commands without writing data to disk.
Note Because of these changes, it is especially important that the computer has a battery backup and a reliable backup policy.
Software update information
A supported feature that modifies the default behavior of the product is available from Microsoft. However, this feature is intended to modify only the behavior that this article describes. Apply this feature only to systems that specifically require it. This feature might receive additional testing. Therefore, if the system is not severely affected by the lack of this feature, we recommend that you wait for the next software update that contains this feature.
If the feature is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the feature.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific feature. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
Note The "Hotfix download available" form displays the languages for which the feature is available. If you do not see your language, it is because the feature is not available for that language.
Prerequisites
No prerequisites are required.
Restart requirement
You must restart your computer after you apply this software update.
Software update replacement information
This software update does not replace any other software updates.
File information
The English version of this software update has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the
Time Zone tab in the Date and Time tool in Control Panel.
Date Time Version Size File name Platform
-------------------------------------------------------------------
15-Apr-2004 23:13 5.2.3790.163 355,328 Srv.sys x86
15-Apr-2004 23:12 5.2.3790.163 991,744 Srv.sys IA-64
When to apply this software update
Microsoft recommends that you consider using this software update only when all the following conditions are true:
- You are experiencing performance problems on your Windows Server 2003-based file server.
- You cannot change the behavior of the client programs to flush files only when necessary.
- You cannot use a RAID set to increase the available disk bandwidth on your server.
- You have sufficient power protection and a sufficient backup-and-restore policy for the file server. If you use this software update, events such as power failures that cause the server memory to be cleared have an increased risk of data corruption.
How to configure this software update
After you apply this software update, you must add and configure the TreatHostAsStableStorage registry entry in the following subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
To change to the new behavior of the SMB_COM_FLUSH command, you must set the value of the TreatHostAsStableStorage entry to a non-zero value. If the value is set to zero, or if the value does not exist, the behavior of the SMB_COM_FLUSH command does not change from its original default behavior.
To add and to configure the TreatHostAsStableStorage registry entry, follow these steps.
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
- Click Start, click Run, type regedit in the Open box, and then click OK.
- Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
- On the Edit menu, point to New, and then click DWORD Value.
- Type TreatHostAsStableStorage as the entry name, and then press ENTER.
- On the Edit menu, click Modify.
- In the Value data box, do either of the following:
- Type a value that is greater than zero (0) to change to the new behavior of the SMB_COM_FLUSH command.
- Type a value of zero (0) to return to the default behavior of the SMB_COM_FLUSH command.
- Click OK.
- Quit Registry Editor.