Logon delays over slow links if oplock is not granted for the policy file in Windows (319440)



The information in this article applies to:

  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows Server 2003, Enterprise Edition
  • Microsoft Windows Server 2003, Standard Edition
  • Microsoft Windows XP Professional
  • Microsoft Windows 2000 Advanced Server SP2
  • Microsoft Windows 2000 Advanced Server SP1
  • Microsoft Windows 2000 Server SP2
  • Microsoft Windows 2000 Server SP1
  • Microsoft Windows 2000 Professional SP2
  • Microsoft Windows 2000 Professional SP1
  • Microsoft Windows XP Professional x64 Edition

This article was previously published under Q319440

SYMPTOMS

If most or all of the following conditions exist, significant logon delays may occur when clients log on:
  • Multiple clients are simultaneously logging on.
  • The clients are sharing one large policy file or a few large policy files.
  • The clients are using low-bandwidth (slow) connections.
  • The clients have access to few domain controllers.
  • The clients have slow-link detection turned off for policy downloads, or the Registry.pol file is being retrieved because of an update.

CAUSE

This behavior may occur if the client is unable to use opportunistic locking when the client is downloading the policy. This performance decrease causes a delay in downloading policies that is more noticeable when access to domain controllers is over a low-bandwidth connection.

RESOLUTION

Windows Server 2003 hotfix information

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Windows Server 2003 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The hotfix adds and sets the following registry key value to the registry:

Registry subkey: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Entry: BufferPolicyReads
Type: DWORD
Value: 1

Note File Reads will only be buffered when the the BufferPolicyReads registry entry exists and is set to 1.

Prerequisites

To install this hotfix, you must have Windows Server 2003 Service Pack 1 (SP1) installed on the x86 and Itanium-based versions of Windows Server 2003. For more information about how to obtain Windows Server 2003 Service Pack 1, click the following article number to view the article in the Microsoft Knowledge Base:

889100 How to obtain the latest service pack for Windows Server 2003

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) 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 item in Control Panel.Windows Server 2003, x86-based versions
File nameFile versionFile sizeDateTimePlatform
Userenv.dll5.2.3790.2749790,52818-Jul-200613:38x86
Windows Server 2003, Itanium-based versions
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Userenv.dll5.2.3790.27491,565,69618-Jul-200601:32IA-64SP1SP1QFE
Wuserenv.dll5.2.3790.2749790,52818-Jul-200601:32x86SP1WOW
Windows Server 2003, x64-based versions
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Userenv.dll5.2.3790.27491,070,59218-Jul-200601:30x64SP1SP1QFE
Wuserenv.dll5.2.3790.2749790,52818-Jul-200601:30x86SP1WOW

Windows XP hotfix information

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Windows XP Service Pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The hotfix adds and sets the following registry key value to the registry:

Registry subkey: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Entry: BufferPolicyReads
Type: DWORD
Value: 1

Note File Reads will only be buffered when the the BufferPolicyReads registry entry exists and is set to 1.

Prerequisites

To install this hotfix, you must have Windows XP Service Pack 2 (SP2) installed on the computer.
For more information about how to obtain Windows XP Service Pack 2 (SP2), click the following article number to view the article in the Microsoft Knowledge Base:

322389 How to obtain the latest Windows XP service pack

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) 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 item in Control Panel.
File nameFile versionFile sizeDateTimePlatform
Userenv.dll5.1.2600.2913724,99222-May-200612:14x86

WORKAROUND

To work around this behavior, all clients need to download the policy files quickly so that other clients are not stopped from using oplocks. To do so, use any of the following methods.

Add domain controllers locally

The addition of a local domain controller means that clients would not have to connect over a slow link.

Distribute the load with additional domain controllers

If it is not practical to place domain controllers in the same site as the client, you can add domain controllers to the main site to which clients connect to provide better load balancing. This method increases the chances of the client being able to access the policy file by using opportunistic locking.

Split a single policy file into multiple policy files

If the policy file is larger than several kilobytes, create a few exclusive policy files to cover the same range of policies. This reduces the amount of time that is required to download the policy files whether or not opportunistic locking is available. Multiple files also increases the chance that the client will use opportunistic locking to access the file.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Clients are effected by this slow logon behavior when the policy file is being downloaded. Administrators can disable slow-link detection (by using Administrator Templates\System\Group Policy), to force policy downloads regardless of the link speed. Each modification of the policy file causes the Registry.pol file to be downloaded by remote clients, for every change. For more information about how a slow link is detected and the default behavior of Group Policy extensions over slow link, click the following article numbers to view the articles in the Microsoft Knowledge Base:

227369 Default behavior for Group Policy extensions with slow link

227260 How a slow link Is detected for user profiles and Group Policy

By default, the redirector attempts to get an 'Opportunistic Lock' when a file is opened remotely. This enables the redirector to use read-ahead caching to improve performance. For more information about oplocks, click the following article number to view the article in the Microsoft Knowledge Base:

129202 Explanation of opportunistic locking on Windows NT

In certain cases, the file server may reject oplock requests, and this often occurs if the file is locked for exclusive/write use. Additionally, the Server service performs several other checks to prevent data damage and improve stability:
  • Check to determine if the file is a system file.
  • Check to determine if the network link is considered reliable.
  • Check to determine if there are filter drivers that haven't finished their job.
For more information about a related topic, click the following article number to view the article in the Microsoft Knowledge Base:

306981 Level II oplocks are not granted after a file is locked

The users that access the files by using oplocks do not experience this behavior because the redirector performs read-ahead caching, and file reads are served from the redirector cache.

If the redirector does not open the remote file by using opportunistic locking, the Windows NT 4.0 SMB or CIF 2.0 specification from MSDN states:

If a client holds no oplocks, all requests other than reads must be sent to the server. Reads may be performed using cached or read-ahead data as long as the byte range has been locked by the client; otherwise they too must be sent to the server.

This causes the policy load method reads to access the server by using the network for each Unicode character that is read. If the policy file is large, and if the available bandwidth to the clients is low, significant delays occur while policies are loading, and this create logon delays.

To identify this situation, use any of the following methods.

Method 1

You can run the third-party Filemon.exe tool from the following Sysinternals Web site: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

The output from the Filemon.exe tool is similar to:

System:8 FSCTL_REQUEST_BATCH_OPLOCK C:\WINNT\SYSVOL\domain\Policies\{Policy-GUID}\user\registry.pol OPLOCK NOT GRANTED
System:8 FSCTL_REQUEST_OPLOCK_LEVEL_2 C:\WINNT\SYSVOL\domain\Policies\{Policy-GUID}\user\registry.pol OPLOCK NOT GRANTED
System:8 FASTIO_QUERY_NETWORK_OPEN_INFO C:\WINNT\SYSVOL\domain\Policies\{Policy-GUID}\user\registry.pol SUCCESS

Method 2

Microsoft network monitor traces display Oplock Level=none for the server response to the file open request:

SMB: R NT create and X, FID = 0x4009
+ SMB: NT status code = 0x0, Facility = System, Severity = Success, Code = (0) STATUS_WAIT_0
+ SMB: Header: PID = 0x00B8 TID = 0x0804 MID = 0x0841 UID = 0x1000
SMB: Command = C NT create and X
SMB: Word count = 42
SMB: Word parameters
SMB: Next offset = 0x0087
SMB: Word count = 42
SMB: Word parameters
SMB: Oplock Level = NONE
SMB: File ID (FID) = 16393 (0x4009)
SMB: File name = \mydom.com\Policies\{E3FDB1FB-0FA1-484E-8751-7009DD5287BD}\User\registry.pol


The sequential 2 byte reads to the policy file, making it a slow download if the file is large:

107 26.234375 SMB C NT create n X, File = \mydom.com\Policies\{E3FDB1FB-0FA1-484E-8751-7009DD5287BD}\User\registry
108 26.234375 SMB R NT create n X, FID = 0x4009 161.123.162.142 161.123.110.40
109 26.296875 SMB C read n X, FID = 0x4009, Read 0x4 at 0x00000000 161.123.110.40 161.123.162.142
110 26.296875 SMB R read n X, Read 0x4 161.123.162.142 161.123.110.40
111 26.343750 SMB C read n X, FID = 0x4009, Read 0x4 at 0x00000004 161.123.110.40 161.123.162.142
112 26.343750 SMB R read n X, Read 0x4 161.123.162.142 161.123.110.40
113 26.406250 SMB C read n X, FID = 0x4009, Read 0x2 at 0x00000008 161.123.110.40 161.123.162.142
114 26.406250 SMB R read n X, Read 0x2 161.123.162.142 161.123.110.40
115 26.453125 SMB C read n X, FID = 0x4009, Read 0x2 at 0x0000000A 161.123.110.40 161.123.162.142

Technical support for x64-based versions of Microsoft Windows

Your hardware manufacturer provides technical support and assistance for x64-based versions of Windows. Your hardware manufacturer provides support because an x64-based version of Windows was included with your hardware. Your hardware manufacturer might have customized the installation of Windows with unique components. Unique components might include specific device drivers or might include optional settings to maximize the performance of the hardware. Microsoft will provide reasonable-effort assistance if you need technical help with your x64-based version of Windows. However, you might have to contact your manufacturer directly. Your manufacturer is best qualified to support the software that your manufacturer installed on the hardware.

For product information about Microsoft Windows XP Professional x64 Edition, visit the following Microsoft Web site: For product information about x64-based versions of Microsoft Windows Server 2003, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:8/15/2006
Keywords:kbHotfixServer kbenv kbnetwork kbprb KB319440 kbAudITPRO