Author: Chorrie
Subject: Windows DEFAULT Registry Hive Size
Posted: 10 January 2014 at 10:17pm
I had the same problem with the default Registry Hive Size was +- 190 MB. I then got 2 tools from Microsoft.
Size of HKEY_CLASSES_ROOT : 26739622
Size of HKEY_USERS : 108017691
Size of HKEY_LOCAL_MACHINE : 62735813
Number of Bins in hive: 12770
Total Hive space usage: 4.90%
Subject: Windows DEFAULT Registry Hive Size
Posted: 10 January 2014 at 10:17pm
I had the same problem with the default Registry Hive Size was +- 190 MB. I then got 2 tools from Microsoft.
1. dureg.exe
2. chkreg.exe
Firstly use dureg.exe to find the registry hive sizes
Example
Run from a command prompt with elevated rights
c:\tools>dureg /a
Size of HKEY_CLASSES_ROOT : 26739622
Size of HKEY_USERS : 108017691
Size of HKEY_LOCAL_MACHINE : 62735813
Total Registry data size: 197493126
Then to check Default Registry Hive Size run from command prompt
C:\tools>dureg /u ".Default"
Size of HKEY_USERS\.Default: 45919575
Size of HKEY_USERS\.Default: 45919575
To compact the Default Registry Hive is a little bit more tricky.
Follow these steps:
1. Reboot your server into recovery mode with the installation disk.
2. Choose your Windows installation normally you just have to enter 1 and press enter
3. Type in the Local Administrator password for your server
4. cd to \windows\system32\config
5. now it should show c:\windows\system32\config>
6. run copy command like
Example
c:\windows\system32\config>copy default c:\tools
7. cd to c:\tools
8. run the second command chkreg from c:\tools example
C:\tools>chkreg /F "C:\tools\default" /C
Number of Bins in hive: 12770
Total Hive space usage: 4.90%
SUMMARY:
Cells, Size, Category
4078, 448728, Keys
8851, 408192, Values
1424, 46808, Key Index
2624, 48248, Value Index
13, 3320, Security
3284, 6260352, Data
23018, 182946208, Free
43292, 190161856, Total Hive
Cells, Size, Category
4078, 448728, Keys
8851, 408192, Values
1424, 46808, Key Index
2624, 48248, Value Index
13, 3320, Security
3284, 6260352, Data
23018, 182946208, Free
43292, 190161856, Total Hive
2024 compacted keys (all related cells in the same view)
9. Now you will have a file in c:\tools> called default.BAK and you will notice this is the compacted version of the default registry hive.
10. Now you can run copy command example:
c:\tools>copy default.BAK c:\windows\system32\config
10. Now you have to rename your default registry file example:
cd to c:\windows\system32\config
run rename command example
10.1 c:\windows\system32\config>ren default default.bkp
10.2 c:\windows\system32\config>ren default.BAK default
Now you have compacted your default registry hive, now you must remove installation disk and reboot.