Offline defragmentation increases the size of the Ntds.dit file (319106)



The information in this article applies to:

  • Microsoft Windows 2000 Server SP1
  • Microsoft Windows 2000 Server SP2
  • Microsoft Windows 2000 Advanced Server SP1
  • Microsoft Windows 2000 Advanced Server SP2

This article was previously published under Q319106
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

SYMPTOMS

After you perform an offline defragmentation on a domain controller, the defragmented Ntds.dit file may be larger than the original Ntds.dit file. Offline defragmentation is intended to reclaim unused space in the file system by defragmenting the Ntds.dit file and removing unused portions of the database. Additionally, the Active Directory Database file (%SystemRoot%\System32\Ntds\Ntds.dit) continues to grow as new attributes are added, even though there is unused space in the database. Both the space that is used and the unused space may continue to increase in size.

CAUSE

In some scenarios, inefficiencies in the Microsoft Jet database engine cause space to be allocated that is not reused and cannot be reclaimed by an offline defragmentation. Additionally, the offline defragmentation process may cause additional space that is not reclaimed to be allocated.

RESOLUTION

To resolve this issue, install Windows 2000 Service Pack 3 (SP3) and then run the offline defragmentation again.

STATUS

Microsoft has confirmed that this is a problem in Microsoft Windows 2000.

MORE INFORMATION

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 generate a report that lists the amount of free space that can be reclaimed by enabling "garbage collection" logging in the registry. After you enable this key, unused space is reported in the event log when you run an offline defragmentation. To enable garbage collection logging, enable the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics Garbage Collection
DWORD=1

During the garbage-collection process, the online defragmentation posts an event in the Directory Service log to indicate how much space will be freed by an offline defragmentation:
Event Type: Information
Event Source: NTDS Database
Event Category: Garbage Collection
Event ID: 1646
Date: 2/28/2002
Time: 10:08:11 PM
User: Everyone
Computer: MYDCNAME
Description:
The Windows Directory Service database has 121 MB of free space out of 130 MB of allocated space.
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

232122 Performing offline defragmentation of the Active Directory database

312403 Distributed link tracking on Windows-based domain controllers


Modification Type:MajorLast Reviewed:4/26/2004
Keywords:kbbug kbpending KB319106