Compress "Bloated" Registry Hives
This article describes how to compress large registry hives to avoid performance issues.
Applies to: Windows Server 2012 R2
Original KB number: 2498915
Consider the following scenario:
You may discover that some of your registry hives are abnormally large or "bloated". Registry hives that are in this state can cause various performance issues and errors in the system log.
There can be many causes for this issue. Troubleshooting the actual cause can be a long and tedious process. In this scenario, you simply want to compress the registry hives to a normal state.
While there may be third-party tools available for this scenario, the process listed below could be followed to compress the affected hives.
- Boot from a WinPE disk. (What is Windows PE)
- Open regedit while booted in WinPe, load the bloated hive under HLKM. (for example,
- Once the bloated hive has been loaded, export the loaded hive as a "Registry Hive" file with a unique name. (for example,
%windir%\system32\config\compressedhive) a) You can use dir from a command line to verify the old and new sizes of the registry hives.
- Unload the bloated hive from regedit. (If you get an error here, close the registry editor. Then reopen the registry editor and try again.)
- Rename the hives so that you'll boot with the compressed hive.
c:\windows\system32\config\ren software software.old
c:\windows\system32\config\ren compressedhive software