Recipe 11.30 Changing the Interval at Which the KCC Runs

11.30.1 Problem

You want to change the interval at which the KCC runs.

11.30.2 Solution

11.30.2.1 Using a graphical user interface
  1. Run regedit.exe from the command line or Start Run.

  2. Expand HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services NTDS Parameters.

  3. Right-click on Parameters and select New DWORD Value.

  4. Enter the following for the name: Repl topology update period (secs).

  5. Double-click on the new value and under Value data enter the KCC interval in number of seconds (900 is the default).

  6. Click OK.

11.30.2.2 Using a command-line interface
> reg add HKLM\System\CurrentControlSet\Services\NTDS\Parameters /v "Repl topology[RETURN] 
update period (secs)" /t REG_DWORD /d <NumSecs>
11.30.2.3 Using VBScript
' This code changes the interval in which the KCC runs.
' ------ SCRIPT CONFIGURATION ------
intNumSecs = <NumSecs>  ' Number of seconds between intervals 
                        ' 900 is default
' ------ END CONFIGURATION ---------

strNetlogonReg = "SYSTEM\CurrentControlSet\Services\NTDS\Parameters"
const HKLM = &H80000002
Set objReg = GetObject("winmgmts:root\default:StdRegProv")
objReg.SetDWORDValue HKLM, strNetlogonReg, _
                     "Repl topology update period (secs)", _
                     intNumSecs
WScript.Echo "KCC interval set to " & intNumSecs

11.30.3 Discussion

By default, the KCC checks its connections ever 15 minutes and makes changes as necessary. You can modify this interval by simply modifying the registry. This was necessary with many Windows 2000 implementations that had large topologies. In that case, the KCC may have taken longer than 15 minutes to run or monopolized the CPU. Changing the KCC to run every hour instead of 15 minutes would help ensure it would complete. With Windows Server 2003, Microsoft made significant improvements to the scalability of the KCC and I recommend running the KCC at the default interval.

There is another related registry setting you should also be aware of. By default, the KCC waits 5 minutes after Active Directory starts up before it runs. You can change this delay by creating a REG_DWORD value called Repl topology update delay (secs) under the HKLM\System\CurrentControlSet\Services\NTDS\Parameters\ key. The data for the value should be the number of seconds to wait after startup before the KCC starts. The default is 300, which is 5 minutes.

11.30.4 See Also

MS KB 271988 (Replication Topology Updates)



    Chapter 3. Domain Controllers, Global Catalogs, and FSMOs
    Chapter 6. Users
    Appendix A. Tool List