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.
RESOLUTIONWindows Server 2003 hotfix informationA 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 requirementYou do not have to restart the computer after you apply this hotfix. Hotfix replacement informationThis 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 |
Userenv.dll | 5.2.3790.2749 | 790,528 | 18-Jul-2006 | 13:38 | x86 |
Windows Server 2003, Itanium-based versions |
Userenv.dll | 5.2.3790.2749 | 1,565,696 | 18-Jul-2006 | 01:32 | IA-64 | SP1 | SP1QFE | Wuserenv.dll | 5.2.3790.2749 | 790,528 | 18-Jul-2006 | 01:32 | x86 | SP1 | WOW |
Windows Server 2003, x64-based versions |
Userenv.dll | 5.2.3790.2749 | 1,070,592 | 18-Jul-2006 | 01:30 | x64 | SP1 | SP1QFE | Wuserenv.dll | 5.2.3790.2749 | 790,528 | 18-Jul-2006 | 01:30 | x86 | SP1 | WOW |
Windows XP hotfix informationA 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 requirementYou do not have to restart the computer after you apply this hotfix. Hotfix replacement informationThis 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. |
Userenv.dll | 5.1.2600.2913 | 724,992 | 22-May-2006 | 12:14 | x86 |
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.
STATUSMicrosoft 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
Modification Type: | Major | Last Reviewed: | 8/15/2006 |
---|
Keywords: | kbHotfixServer kbenv kbnetwork kbprb KB319440 kbAudITPRO |
---|
|