What is the maximum registry size?

John Savill

March 4, 1999

3 Min Read
ITPro Today logo in a gray background | ITPro Today

A. The maximum size is 102MB, however it is slightly morecomplicated than this.

The registry entry that controls the maximum size of the registry isHKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlRegistrySizeLimit. Bydefault this entry will not exist so it will need to be created:

  1. Start the registry editor (regedit.exe)

  2. Move to the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl key

  3. From the Edit menu, select New - DWord value and enter the name asRegistrySizeLimit

  4. Double click the new entry and enter a value in bytes (choose decimal asthe type)

The minimum size is 4MB, and if anything less than this is entered in theregistry then it will be forced up to 4MB. The maximum is 80% of the paged pool(which has a maximum size of 128MB, hence 102MB which is 80% of 128MB). If noentry is entered then the maximum size is 25% of the paged pool. The paged poolis an area of physical memory used for system data that can be written to diskwhen not in use.

An important point to note is that the RegistrySizeLimit is a maximum, notan allocation, and so setting a high value will not reserve the space, and itdoes not guarantee the space will be available.

This can also be configured using the System Control Panel applet, click onthe Performance tab and the maximum registry size can be set there. You wouldthen need to reboot.

For more information see Knowledge Base Article Q124594

There is another complication, during early boot, NTLDR loads some code,allocates working memory, and reads in parts of the registry. All of this hasto fit in the first 16MB of memory regardless of how much memory is physicallyinstalled. The entire system file is read; enough memory is required to containthe whole file as stored on disk without regard to how much of it is useful.

Some problems

  • The registry contains wasted space (sometimes a LOT). Try saving the SYSTEMkey from REGEDT32 and then comparing the saved file size with that of theSYSTEM hive in %systemroot%system32config. On one machine, I reduced theSYSTEM hive from 9,720 KB to 864 KB in this manner.

  • Creation of the LastKnownGood ControlSet (usually #2) soon after bootalmost doubles the size of the file. Depending on circumstances, such asreclaimable space in the "gas", additions to the registry may requirenew space to be allocated beyond the end of the combined Current andLastKnownGood SYSTEM hive. Now after the next boot, another LastKnownGood istacked onto the end of the file, adding about a third to its size. In my case,a registry with a "true" size of 4MB was thus inflated to 12MB andcaused boot failure.

A number of ways to get rid of the excess space:

  • If FAT, merely boot from DOS floppy, then replace the SYSTEM file

  • If NTFS, boot from another NT partition and replace file in previouspartition

  • Use REGBACK/REGREST from the NT reskit. [maybe easiest of all]

  • Run RDISK, shutdown, and repair the system. Make sure you use RDISK /s whenusing this to also backup the user database.

  • Use ERD Commander from Winternals Software

To turn this off use REGEDT32 to add the value"ReportBootOk:REG_SZ:0" [zero] toHKEY_Local_MachineSOFTWAREMicrosoftWindowsNTCurrentVersionWinlogon Thiswill prevent creation of the LastKnownGood ControlSet. If a boot fails becausethe 16 MB limit with NTLDR is exceeded, no dump can be produced and MS will notsolve the problem. This 16 MB problem will not be changed in NT 5.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like