Microsoft KB Archive/840390

From BetaArchive Wiki

Article ID: 840390

Article Last Modified on 10/26/2006



APPLIES TO

  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise x64 Edition



Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry


INTRODUCTION

This article discusses a software update that changes the current behavior of the Server Message Block (SMB) protocol SMB_COM_FLUSH command in Microsoft Windows Server 2003. This software update can help improve file server performance.

In certain hardware configurations, the throughput of a Microsoft Windows Server 2003-based file server may be limited by disk write performance. Typically, these configurations use a single disk spindle on the server, and clients issue many writes to the server. You may want to consider using this software update to increase file server performance if both of the following conditions are true:

  • You cannot use a redundant array of independent disks (RAID) set to increase the number of disk spindles that are available on the server.
  • The files that are stored on the server are not subject to strict data consistency requirements.


MORE INFORMATION

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 product's default behavior is now available from Microsoft, but it is only intended to modify the behavior that this article describes. Apply it only to systems that specifically require it. This feature may 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 Windows Server 2003 service pack that contains this feature.

To obtain this feature immediately, contact Microsoft Product Support Services. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

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.

  1. Click Start, click Run, type regedit in the Open box, and then click OK.
  2. Locate and then click the following registry subkey:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

  3. On the Edit menu, point to New, and then click DWORD Value.
  4. Type TreatHostAsStableStorage as the entry name, and then press ENTER.
  5. On the Edit menu, click Modify.
  6. 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.
  7. Click OK.
  8. Quit Registry Editor.


REFERENCES

The SMB_COM_FLUSH command is a part of the Common Internet File System (CIFS) protocol. To download the CIFS protocol, visit the following Microsoft Web site:

For additional information about Microsoft software updates, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates



Additional query words: stable storage CIFS

Keywords: kbqfe kbhotfixserver kbbug kbfix kbwinserv2003presp1fix KB840390