The information in this article applies to:
IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe. SUMMARYThis article describes how to optimize Active Directory replication in large network configurations. MORE INFORMATIONWARNING: Using Registry Editor incorrectly can cause serious problems that
may require you to reinstall your operating system. Microsoft cannot
guarantee that problems resulting from the incorrect use of Registry Editor
can be solved. Use Registry Editor at your own risk.
ExampleIn some large site configurations containing many sites, many domains, or many routes betweens sites, the inter-site KCC executes slowly, consuming too much Central Processing Unit (CPU) time and memory resources.If D is the number of domains in your network, S is the number of sites in your network, and (1 + D) * S^2 <= 100,000then you can safely ignore the rest of this article. The following table lists the execution times and memory consumption figures for an inter-site KCC running in a variety of hub-and-spoke configurations with no performance tuning applied. Each site contains a domain controller for a single domain and a global catalog. Domains are equally dispersed across the sites. Automatic site-link bridging is enabled. Measurements were made on an Intel Pentium III Xeon at 500MHz with 1 gigabyte (GB) of Random Access Memory (RAM). Memory usage includes database caching. Memory consumption will be lower on computers with less physical memory.
(1 + num domains) * num sites ^ 2 * 0.0000075 minutesYou can determine how long the KCC runs in your existing configuration using the Active Directory Sites and Services snap-in:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NTDS\DiagnosticsChange the "1 Knowledge Consistency Checker" value to a value of 3 or greater. With this value set to 3 or greater, the KCC will log events 1009 and 1013 to signify the beginning and end of the check. For additional information about Event Logging in Windows 2000, click the article number below to view the article in the Microsoft Knowledge Base: Q220940 Enabling Diagnostic Event Logging for Active Directory Services RecommendationsIf your configuration does not satisfy the above criteria, then use the appropriate method:Reduce Use of Site-Link Bridges in Your Site ConfigurationThis option works well in typical hub and spoke configurations by reducing the number of potential routes between sites.Automatic site-link bridging indicates the entire network is fully Internet Protocol (IP) routed. In this situation, any computer in a given site can communicate over IP with any computer in any other site. Automatic site-link bridging is enabled for both the IP and Simple Mail Transport Protocol (SMTP) inter-site transports by default. Disabling this feature requires that you add explicit site-link bridge objects where needed. Site-link bridges are necessary only if a particular site contains a domain controller of a domain that is not present in any adjacent site, but another domain controller of that domain does occur in other sites in the forest. An adjacent site is defined to be any site included in any site link containing the site in question. Most configurations do not require the use of site-link bridges, because any site holding a domain controller of a given domain that occurs in more than one site is almost always adjacent to at least one other site containing a domain controller of the same domain. If KCC is unable to directly or transitively connect all the sites containing domain controllers of a particular domain after you disable automatic site-link bridging, the KCC will log event 1311. ExampleThe Directory Service consistency checker has determined that either:
To disable automatic site-link bridging:
(1 + number of domains) * number of sites * 0.0006 minuteswhere number of domains is the number of domains, and number of sites is the number of sites. The formula for hub sites is: (1 + number of domains) * number of sites * 0.0015 minutes Run the Inter-site KCC Only During Off Peak HoursThis option works well when the computer has a time slot when little work is being done, and an inter-site KCC run fits within this time slot. This technique would typically be used only if the use of site-link bridging has already been reduced, and the execution time or memory usage of the KCC remains a problem during critical business hours.The KCCs in a given site can be configured to disable only the inter-site topology calculation, maintaining their ability to respond to changing replication requirements within the site. The inter-site topology calculation can then be re-enabled at a specific time of day just long enough for a KCC in the site to run the inter-site check and can then be disabled again. When the inter-site topology check is disabled for a particular site, that site will not respond to changes in the inter-site topology. If one or both replication partners for all inter-site connections that replicate a given domain are unavailable, no KCC automatic adaptation to a new source or destination will be done until the domain controllers come back online or the inter-site portion of the KCC is run again. NOTE: The administrator can manually add connections while the inter-site KCC is disabled. To evaluate whether this option is realistic in your configuration, first determine how long the KCC takes to run in your environment. Then determine if there is a block of time on one domain controller in each site to accommodate the time and memory requirements. It is not necessary for the inter-site portion of the KCC to be run in all sites at the same time. To schedule the inter-site KCC, use the Task Scheduler component to schedule executions of "wscript /b runkcc.vbs" (the script in text form is included later in this article). For more information about Task Scheduler, refer to the Task Scheduler topic in Windows 2000 Help. Runkcc.vbs requires the support tools in the Support\Tools folder in the Windows 2000 CD-ROM to be installed on the computer on which it is run. Disable Inter-Site KCC Entirely, Manually Configure ConnectionsThis option works well in typical hub-spoke configurations. It is typically used only when the two previous methods are not viable options, especially in configurations with thousands of sites.When automatic inter-site topology is disabled entirely, it becomes the responsibility of the administrator to create the necessary inter-site replication connection objects to ensure that replication data continues to flow across the forest. Typically, customers with enough sites to surpass the KCC limits employ hub-and-spoke network topologies to connect a corporate headquarters with a large number of homogeneous branch office sites. This symmetry greatly simplifies the process. Before creating your own connection objects without the help of the KCC, there are several points to consider:
Runkcc.vbs (VBScript to Trigger the One-time Run of the KCC)Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Solution Provider or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Solution Providers, please see the following page on the World Wide Web:http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.asp'*/ runkcc.vbs '*/ '*/ Parameters: <none> '*/ Purpose: When run on a domain controller, this script makes the local domain controller the Inter-Site '*/ Topology Generator for its site, enables inter-Site topology generation temporarily if it is disabled, '*/ runs the KCC topology generation process, and disables inter-site topology generation if it was '*/ configured so to begin with. '*/ '*/ On Error Resume Next Call ExecuteKCC() Public Sub ReportError () 'tell the user the error wscript.Echo "The following error occurred: (" + cstr(hex(err.number)) +") " + cstr(err.description) End Sub Public Sub ExecuteKCC () On Error Resume Next wscript.echo "Loading functions for use by this script..." set dll=createobject("iadstools.domain controllerfunctions") if err.number <> 0 then ReportError:WScript.Quit dll.enabledebuglogging 1 'get the local box name wscript.echo "1> Connecting to local machine..." set localMachine=GetObject("LDAP://localhost/rootdse") if err.number <> 0 then ReportError:Wscript.Quit ServerName=localmachine.get("dnsHostName") if err.number <> 0 then ReportError:WScript.Quit wscript.echo "2> Found local machine " + ucase(ServerName) 'get the config NC configNC=localMachine.get("configurationNamingContext") if err.number <> 0 then ReportError:Wscript.Quit wscript.echo "3> Configuration Naming Context is: " + configNC 'get the SiteName of this box domain controllerSiteName=dll.dsgetsitename if err.number <> 0 then ReportError:Wscript.Quit wscript.echo "4> The site for this server is: " + domain controllersitename 'get the DSA DN for this box DSAObj = localMachine.get("dsServiceName") if err.number <> 0 then ReportError:Wscript.Quit wscript.echo "5> The DN for this machine's DSA is: " + DSAObj 'bind to the Site Settings object in the Directory SiteSettingsPath="LDAP://localhost/CN=NTDS Site Settings,CN="+domain controllerSiteName+",CN=Sites,"+configNC set SiteSettings=GetObject(SiteSettingsPath) if err.number <> 0 then ReportError:WScript.Quit 'make the current box the ISTG wscript.echo "6> Making " + ucase(ServerName) + " the Inter Site Topology Generator for the " + ucase(domain controllerSiteName) + " site." SiteSettings.Put "interSiteTopologyGenerator",DSAObj SiteSettings.SetInfo if err.number <> 0 then ReportError:Wscript.Quit 'get the current options origOptions=SiteSettings.Get("options") if hex(err.number) = "8000500D" then origOptions=0 elseif err.number=0 then 'do nothing else ReportError:Wscript.Quit end if modOptions=origOptions wscript.echo "7> Currently, the options specified for KCC operations for the ISTG in this site is set to: " + cstr(origOptions) 'enable the KCC if currently disabled, otherwise, leave it alone if modOPtions And 16 then mod2Options=modOptions XOr 16 wscript.echo "8> The KCC is currently disabled for inter-site topology generation. Temporarily re-enabling it. Setting options to: "+ cstr(mod2Options) SiteSettings.Put "options", mod2Options SiteSettings.SetInfo if err.number <> 0 then ReportError wscript.echo "An error occurred during the process of modifying the options attribute. Check to make sure that it has the correct original value. This script is terminating." Wscript.Quit end if else wscript.echo "8> The KCC is currently enabled to handle inter-site topology generation. No change is necessary before triggering the KCC." end if 'run the KCC Result=dll.TriggerKCC(cstr(ServerName)) if err.number > 0 then ReportError If result=0 then wscript.echo "9> The KCC was successfully triggered on " + ucase(ServerName) else wscript.echo "9> The following error occurred trigerring the KCC on " + ucase(ServerName) + ": " + dll.lasterrortext end if 'disable the KCC wscript.echo "10> Re-writing the original options (" + cstr(origOptions) + ") to the ISTG." SiteSettings.Put "options", origOptions SiteSettings.SetInfo if err.number <> 0 then ReportError:WScript.Quit End Sub 'end script For additional information about the Windows 2000 KCC, click the article numbers below to view the articles in the Microsoft Knowledge Base: Q242780 Disabling KCC From Automatically Creating Replication Topology Q224815 The Role of the Inter-Site Topology Generator Q214745 Troubleshooting Event ID 1311: Knowledge Consistency Checker Additional query words: kbfaqw2kds
Keywords : kbnetwork kbtool ntdomain |
Last Reviewed: January 31, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |