Microsoft KB Archive/315407

= The &quot;HeapDecommitFreeBlockThreshold&quot; registry key =

Article ID: 315407

Article Last Modified on 10/25/2007

-

APPLIES TO


 * Microsoft Exchange 2000 Server Standard Edition
 * Microsoft Exchange 2000 Enterprise Server
 * Microsoft Exchange Server 2003 Enterprise Edition
 * Microsoft Exchange Server 2003 Standard Edition

-



This article was previously published under Q315407



Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SUMMARY
This article describes the HeapDecommitFreeBlockThreshold registry key.

When memory is freed at a given address, the heap manager checks how many contiguous bytes are free around that address. After that check is complete, the heap manager can do one of two things:
 * Keep the contiguous memory block committed.
 * Decommit the contiguous memory block and mark it as reserved only.

The HeapDecommitFreeBlockThreshold registry key specifies the number of contiguous bytes above which the memory is decomitted (the second option) rather than retained for reuse (the first option).

Note On computers that have one gigabyte or more of RAM, apply the following setting for maximum performance:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager HeapDeCommitFreeBlockThreshold = REG_DWORD 0x00040000

On computers that have less than one gigabyte of RAM, do not use the HeapDecommitFreeBlockThreshold registry key unless intense memory fragmentation is occurring.



MORE INFORMATION
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

By default, the heap manager does not necessarily combine all free blocks or make new allocations; therefore, blocks may be de-committed and become useless holes in the virtual address space. The HeapDecommitFreeBlockThreshold registry key provides better control of how the memory is handled as it is freed. To add this key, you need to edit the registry.

To add the HeapDecommitFreeBlockThreshold registry key:  Start Registry Editor (Regedt32.exe). Locate and click the following key in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager

 On the Edit menu, click Add Value, and then add the following registry value:

Value name: HeapDecommitFreeBlockThreshold

Data type: REG_DWORD

Radix: Decimal

Value Data: The number of bytes

This value specifies the number of freed bytes above which the heap manager decommits the memory (instead of retaining and reusing the memory). If you set this registry key to a high value (for example, 262144), the heap manager is more effective when making sure that no bytes are decommitted. Therefore, virtual address fragmentation is lessened or even avoided.

Note This value is the number of bytes in decimal. The recommended value is 262144 which corresponds with a hex value of 0x00040000. Quit Registry Editor. Restart your computer.

Additional query words: VM, virtual memory, fragmented, exchange, store, e2k VA XADM

Keywords: kbhowto KB315407

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.