Knowledge Base Terminal Services Performance Problem Because of Contention on CmpRegistryLock PSS ID Number: Q317357 Article Last Modified on 07-31-2002 The information in this article applies to: * Microsoft Windows 2000, 2000 SP1, 2000 SP2 Server * Microsoft Windows 2000, 2000 SP1, 2000 SP2 Advanced Server 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: Q256986 Description of the Microsoft Windows Registry Symptoms When 50-100 interactive Terminal Services users are logged on, and other Terminal Services users are logging on or off at the same time, your computer may become irresponsive for about 10-30 seconds. The frequency of this symptom is variable, but can occur 10-20 times a day. When this problem occurs, the mouse and keyboard do not respond, but the computer is responsive on the network (to ping and net use commands), and on the console. Notes You can determine that you are experiencing this problem by running Perfmon.exe locally. Perfmon.exe show a series of intervals of "system inactivity", when all counters drop to zero (0). During this interval, you may notice heavy system disk activity. This behavior is not specific to any one computer manufacturer or model, and may potentially affect all Windows 2000 installations, especially those that are using Terminal Services. Terminal Services is an "enabler" for this performance problem, because of the total size of the registry hives that are associated with all of the Terminal Services sessions that are in progress. This problem can occur when there is plenty of available memory. Cause This performance problem may be caused by a slowdown that is caused by the number of input/outputs on the system disk during the registry-flush operation. The "system inactivity" intervals you see in Perfmon.exe occur because of contention on the CmpRegistryLock, which protects against registry writers (such as Perfmon.exe and Explorer.exe) during the hive-flush operation. NOTE: This input/output slowdown was noted to occur even though the computer had plenty of available memory. If you computer does not have enough memory, performance may be substantially degraded before you can see the input/output slowdown. Resolution To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base: Q260910 How to Obtain the Latest Windows 2000 Service Pack The English version of this fix should have the following file attributes or later: Date Time Size File name ----------------------------------------- 26-Feb-02 23:34 1,686,976 Ntkrnlmp.exe 26-Feb-02 23:35 1,686,720 Ntkrnlpa.exe 26-Feb-02 23:35 1,707,392 Ntkrpamp.exe 26-Feb-02 23:34 1,664,640 Ntoskrnl.exe 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. You can use the following registry key to reduce the registry-flush frequency so that registry modifications can accumulate before the flush. To do so, follow these steps: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager Start Registry Editor (Regedt32.exe). Locate and then click the following key in the registry: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager On the Edit menu, click Add Key, and then add the following registry value: Key Name: Configuration Manager Click the Configuration Manager key. On the Edit menu, click Add Value, and then add the following registry value: Value name: RegistryLazyFlushInterval Data type: REG_DWORD Radix: Decimal Value data: time in seconds (default value is 5). Quit Registry Editor. NOTE: The default setting for the RegistryLazyFlushInterval value is the same as in Windows 2000 and previous versions of Windows. Tune for Performance A reduction of the number of registry-flush operations, by a factor of 2-3, was measured for values of 30-60 seconds of this interval. Tune Suggestion Perform a comparative test with the interval set to 30 seconds, and then to 60 seconds. If the observed performance is about the same, select the value of 30 seconds. If the observed difference of performance is important, select a higher value that is closer to 60 seconds. Note that no performance enhancements are noticed when you use an interval that is higher than 60 seconds. Workaround To work around this problem, use either of the following methods. * Enhance system disk-write performance, and turn on write-back caching. * If you can, reduce the size of user profiles. Status Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows 2000 Service Pack 3. More Information For additional information about how to obtain a hotfix for Windows 2000 Datacenter Server, click the article number below to view the article in the Microsoft Knowledge Base: Q265173 The Datacenter Program and Windows 2000 Datacenter Server Product For additional information about how to install multiple hotfixes with only one reboot, click the article number below to view the article in the Microsoft Knowledge Base: Q296861 Use QChain.exe to Install Multiple Hotfixes with One Reboot Additional query words: kbBaseOS temporary hangs bottleneck Keywords: kbWin2000PreSP3Fix kbWin2000sp3fix Issue Type: kbbug Technology: kbwin2000AdvServ kbwin2000AdvServSearch kbwin2000Serv kbwin2000ServSearch kbwin2000Search kbWinAdvServSearch kbWin2000AdvServSP2 kbWin2000AdvServSP1 kbwin2000ServSP1 kbwin2000ServSP2 Send feedback to Microsoft <JavaScript:sendfeedback('Q317357', 'TECHNET@xxxxxxxxxxxxx')> © 2002 Microsoft Corporation. All rights reserved. ********************************************** This weeks sponsor 99Point9.com 99Point9 helps solve your unresolved technical server-based questions, issues and incidents. http://www.99point9.com *********************************************** For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm