Platform SDK: Registry |
Registry data is stored in the paged pool, an area of physical memory used for system data that can be written to disk when not in use. The RegistrySizeLimit registry key value establishes the maximum amount of paged pool space—and, because it is the same size as the maximum paged pool space, the disk paging file space—that can be consumed by registry data from all applications. It is designed to prevent the registry from consuming space needed by processes. This value does not allocate space in the paged pool, nor does it assure that the space will be available if needed.
The hive location of RegistrySizeLimit is HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control. The value of RegistrySizeLimit is of the type REG_DWORD and has a data length of 4 bytes. If you attempt to set the value of RegistrySizeLimit to another type or data length, the value will remain unchanged. The value of RegistrySizeLimit is not set by default; use the Registry Editor to set the value.
The paged pool size is determined by the PagedPoolSize registry key value, which is located in the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Memory Management subkey. When the paged pool size changes, either because the Windows operating system adjusts it or an administrator changes it, the value of RegistrySizeLimit changes also. The default size of the paged pool is 32 MB, so the RegistrySizeLimit value is 8 MB.
The system ensures that the minimum value of RegistrySizeLimit is 4 MB and the maximum is approximately 80 percent of the PagedPoolSize value. Thus, the size of the paged pool is limited to 128 MB, and the RegistrySizeLimit value cannot exceed 102 MB, or 80 percent of 128 MB.
If the value of RegistrySizeLimit is 0, or if the entry doesn't exist in the registry, the system dynamically adjusts the maximum size of the registry according to the size of the paged pool. If the value of this entry is greater than 16 MB and less than or equal to 80 percent of the paged pool size, the value will be used as the maximum size of the registry size. The system will not calculate an optimal maximum size or adjust the maximum size when the amount of memory or the size of the paged pool changes. If the value of this entry is greater than 80 percent of the size of the paged pool, the system sets the maximum size of the registry to 80 percent of the size of the paged pool.
In addition, if the value of PagedPoolSize is 0, the system calculates an optimal value for both RegistrySizeLimit and PagedPoolSize. For most purposes, this is a good default value for PagedPoolSize, unless your server has less than 256 MB of memory. Typically, the system sets the size of the paged pool approximately equal to the amount of physical memory on the computer, and sets the maximum size of the registry to approximately 33 percent of the value of PagedPoolSize.
The space controlled by RegistrySizeLimit includes the hive space, as well as some of the registry's run-time structures. Other run-time structures in the registry are protected by their own size limits or by other means.
To ensure that a user can always start the system and edit the registry, the registry is not subject to the value set in RegistrySizeLimit until after the first successful loading of a hive—that is, the loading of a user profile.
For more information on RegistrySizeLimit and PagedPoolSize, refer to the registry help file, Regentry.chm, in the Windows NT Resource Kit.