Limiting Exchange 2010 SP1 Database Cache

Some time ago, I blogged about on how to limit the amount of memory Exchange 2010 can allocate for database cache. After the introduction of Exchange 2010 Service Pack 1 this didn’t seem to work anymore, as many people reported.

After some investigation, it turns out you also need to set the msExchESEparamCacheSizeMin value for Exchange 2010 SP1?s cache manager to honor the minimum and maximum limits for allocating database cache memory.

To show you this, I’ll first show Exchange 2010 SP1 where I only set msExchESEparamCacheSizeMax. In this example, I’ll use a value of 1024 which corresponds to 32 MB (1024 * 32kb pages). I then turned on Performance Monitor and started monitoring the following MSExchange Database Cache\Information Storecounters:

  • Database Cache Size, the current allocated database cache size;
  • Database Cache Size Min, the minimum database cache size;
  • Database Cache Size Max, the maximum database cache size.

Continue reading

Limiting Exchange 2010 store.exe Database Cache

Note (6apr2011): Setting the MsExchESEParamCacheSizeMax only doesn’t produce the required result as of Exchange 2010 SP1. For more information on how to limit the database cache size in Exchange 2010 SP1, see Limiting Exchange 2010 SP1 Database Cache.

I received a question from someone implementing Exchange 2010 who was surprised to see Exchange taking up all available memory. This is because in Exchange 2010 (2007 as well) memory allocation is dynamic, contrary to Exchange 2003 and earlier versions where, depending on the situation, you had to fiddle around with boot.ini switches like /3GB to make memory available to Exchange. Also, the maximum database cache size was limited in Exchange 2003 to around 1.2 GB due to virtual address space limitations (see MSKB 815372).

The main reason Exchange 2007/2010 claims memory for its database cache is performance. The more memory is assigned to the database cache, the less I/O’s are generated because things can be dealt with in-memory and the database cache becomes more effective. When a certain amount of transactions has been reached, changes will be physically written to databases (so far they’ve been stored in-memory and written to transaction logs). This limit is called the log checkpoint depth target.

Continue reading

How to clear Vista’s offline folders cache

If you are using Vista’s offline folders feature and you suspect that the offline cache has gone corrupt, or if you simply want to reset the cache, follow these steps.

  1. Open up registry editor (WARNING: Only for Advanced Users)
  2. Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Csc
  3. Add a new key (folder) called Parameters
  4. Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Csc\Parameters, add a new DWORD called FormatDatabase and set its value to 1

If you want to completely disable the offline folders functionality, you must also stop and disable the offline folders service:

net stop "Offline Files"
WMIC SERVICE WHERE Caption="Offline Files" CALL ChangeStartMode "Disabled"