Home > Articles > Certification > Microsoft Certification

  • Print
  • + Share This
This chapter is from the book

Changing the Garbage Collection Logging Level

Garbage collection runs regularly in a DC and removes deleted (or tombstoned) objects from the database.

When objects are deleted, it frees up space in the database but the database file size does not change. In other words, if the database is 100 MB, and then you delete 100 objects, the database size will still be 100 MB but it will have more free space. However, if you do an offline defragmentation, you can reclaim the free space. Before you do this, figure out how much free space you'll gain by doing the offline defragmentation.

If you change the garbage collection logging level, the garbage collection process will log Event ID 1646 (as shown in Figure 12-1) in the Directory Service log. This log entry shows how much free space an offline defragmentation will reclaim (only 2 MB in Figure 12-1).

Figure 12-1

Figure 12-1 Event ID 1646 after changing the garbage collection logging level

The following steps show how to reset the garbage collection logging level.

Step

Command

1.

Click Start, type regedit, and press Enter to launch the Registry Editor.

2.

Browse to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics entry.

3.

Locate the Garbage Collection value and double-click it. Enter 1 as the value. Your display should look similar to Figure 12-2.

4.

Click OK. Close the Registry Editor.

Figure 12-2

Figure 12-2 Changing the garbage collection logging level

  • + Share This
  • 🔖 Save To Your Account