Performance problem because of contention on CmpRegistryLock

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


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 unresponsive 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.
ImportantYou 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.


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 your computer does not have enough memory, performance may be substantially degraded before you can see the input/output slowdown.


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:
260910 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
18-April-02 0:46 5.0.2195.53241,687,296 Ntkrnlmp.exe
18-April-02 0:47 5.0.2195.53241,686,976 Ntkrnlpa.exe
18-April-02 0:47 5.0.2195.53241,707,584 Ntkrpamp.exe
18-April-02 0:46 5.0.2195.53241,665,024 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
  1. Start Registry Editor (Regedt32.exe).
  2. Locate and then click the following key in the registry:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager
  3. On the Edit menu, click Add Key, and then add the following registry value:
    Key Name: Configuration Manager
  4. Click the Configuration Manager key.
  5. 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).
  6. 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.


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.


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:

265173 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:

296861 Use QChain.exe to Install Multiple Hotfixes with One Reboot

ID articolo: 317357 - Ultima revisione: 19 giu 2014 - Revisione: 1