Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Logon delays occur over a slow connection if opportunistic locking is not granted for the policy file in Windows


Symptoms

In Windows, significant logon delays may occur when clients log on. This problem occurs if most or all of the following conditions are true:

  • 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.

↑ Back to the top


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 occurs over a low-bandwidth connection.

↑ Back to the top


Resolution

For Windows Vista and newer operating systems, you need to set this registry entry to take advantage of the improved reading of REGISTRY.POL:

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

Windows Server 2003 service pack information

To resolve this problem, obtain the latest service pack for Windows Server 2003. For more information, 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

Windows Server 2003 hotfix information

The hotfix that is described in this article been superseded by another hotfix. For more information about the new hotfix, click the following article number to view the article in the Microsoft Knowledge Base:

930597 Some registry-based policy settings are lost and error messages are logged in the Application log on a Windows XP-based computer or on a Windows Vista-based computer

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

↑ Back to the top


Windows XP hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only 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 Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer 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 apply 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

↑ Back to the top


Workaround

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

Add domain controllers locally

When you do this, clients do 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.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Microsoft Windows Server 2003 Service Pack 2.

↑ Back to the top


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 opportunistic locking requests. This frequently occurs if the file is locked for exclusive/write use. Additionally, the Server service performs the following checks to prevent data damage and to improve stability:

  • Check to determine whether the file is a system file
  • Check to determine whether the network link is considered reliable
  • Check to determine whether there are filter drivers that have not 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:

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

↑ Back to the top


Technical support for x64-based versions of Microsoft Windows

If your hardware came with a Microsoft Windows x64 edition already installed, your hardware manufacturer provides technical support and assistance for the Windows x64 edition. In this case, your hardware manufacturer provides support because a Windows x64 edition was included with your hardware. Your hardware manufacturer might have customized the Windows x64 edition installation by using 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 must have technical help with a Windows x64 edition. 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. If you purchased a Windows x64 edition such as a Windows Server 2003 x64 edition separately, contact Microsoft for technical support.

For product information about Windows XP Professional x64 Edition, visit the following Microsoft Web site: For product information about x64-based versions of Windows Server 2003, visit the following Microsoft 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.

↑ Back to the top


Keywords: kb, kbwinserv2003sp2fix, kbhotfixserver, kbenv, kbnetwork, kbprb, kbbillprodsweep

↑ Back to the top

Article Info
Article ID : 319440
Revision : 3
Created on : 4/17/2018
Published on : 4/18/2018
Exists online : False
Views : 120