Admin Tip # 193 : Technique to Compress NTs Registry

Hits: Failed to execute CGI : Win32 Error Code = 3


NT's registry is implemented as a database. It shares many of the characteristics including fragmentation as items are added, removed, or changed. In particular, when items are removed from the registry, there is no cleanup mechanism to recover the now unused space in the database. Microsoft released RegClean to clean up some of the debris. A alternative to Microsoft's RegClean is the freeware Regcleaner .Mark Russinovich has released PageDefrag which can defrag the page file and registry hive files.

Fragmentation can become significant over time on a busy system. Use either tool with caution. There is no tool to compress the registry, to recover lost space and reindex the fundamental database. But there is a method to achieve this result. Backup the registry and be prepared to get back to where you started if things go wrong.

There is some risk in this procedure. But as the hives get large with a high amount of dead space, performance suffers. If your server or workstations gets slower and slower for no apparent reason, you may get the performance back using this approach.

Do not attempt if you are not in a position to recover back to the starting point.

A safer and easier alternative is RegCompact .

Microsoft presents three methods to compress a bloated SAM on a PDC / BDC. Scary but then so are the use of non-supported 3rd party utilities on domain controllers.