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.
Since Exchange 2003, the log checkpoint depth target is 20 MB databases. As of Exchange 2007, for configurations existing of 2+ database copies, the depth target is 100 MB for active copies and 5 MB for passive copies. This means, after 100 MB of transactions changes will be physically flushed to the database. The more changes are delayed (i.e. stored in-memory and in transaction logs), the chance of overlapping changes or combined writes increases lessening I/O’s required. Note that to lessen the time to fail-over, passive copies have a lower depth target making them commit changes more often, minimizing the log files to replay after a fail-over.
Back to the topic, Database Cache. Exchange uses by default certain mailbox database cache sizes for certain amounts of memory. The table below contains these values for systems holding the mailbox server role as well as servers holding multiple roles (source):
|RAM Physical Memory||Database Cache Size, Mailbox Role||Database Cache Size, Multiple Roles|
|2 GB||512 MB||Unsupported|
|4 GB||1 GB||Unsupported|
|8 GB||3.6 GB||2 GB|
|16 GB||10.4 GB||8 GB|
|32 GB||24.4 GB||20 GB|
|64 GB||53.6 GB||44 GB|
|128 GB||111.2 GB||92 GB|
Now what if you have a real uncontrollable urge to limit Exchange in its attempt to optimize its database cache and you want to restrict its growth? You can do this by changing the following Active Directory property (per store) using ADSIEDIT.msc (or using another tool or scripting language of your liking) as follows:
- Start ADSIEDIT.msc
- Navigate to Configuration > Services > Microsoft Exchange > <Organization Name> > Administrative Groups > <Administrative Group> > Servers > <Server Name> > InformationStore
- Right-click InformationStore, and edit msExchESEParamCacheSizeMax. Set it it to the number of pages to maximize the Database Cache to. Note that Exchange 2007 works with 8 KB pages and Exchange 2010 with 32 KB pages!
- Restart the Microsoft Exchange Information Store service for the change to become effective.
So, for instance, if you want to limit the Database Cache to 4 GB of an Exchange 2010 server, set msExchESEparamCacheSizeMax to 131072 (4 GB = 4.194.304 KB / 32 KB). If you want to limit the Database Cache to 2 GB of an Exchange 2007 server, set msExchESEparamCacheSizeMax to 262144 (2 GB = 2.097.152 KB / 8 KB).
Note that lowering these values may degrade performance, in terms of server performance as well as in terms of end-user experience. However, smaller organizations with a limited number of mailbox users may benefit because they don’t let Exchange claim significant amounts of memory which it will never use.
thanks !…will try it
Hello, we have tried it. On Exchange 2007 it worsk perfectly, but on 2010 it doesn’t. Do you have any ideas, how to diagnose it?
Thanks J. Kuzel
After editing, did you allow sufficient time for AD replication before restarting MSExchangeIS or the server?
What does the “MSExchange Database(Information Store)\Database Cache Size (MB)” counter max out on?
Yes, there was a lot of time. It is more than one week ago, and many restarts of MSExchangeIS has been done.
I have check cache size counter, and it is: 12772 MB
Limit is set to 8GB
Pingback: Exchange & Dynamic Memory : Don’t « EighTwOne (821)
Same problem here.
store.exe consumes 13 GB at the moment. I’ve limited the store.exe to 2 GB (2048*32=65536 for msExchESEparamCacheSizeMax), rebooted the complete machine, and after a week… still 13 GB for store.exe…
I found out what the issue is, see post here:
The setting does not seem to work with 2010 SP1 installed. Needless to say this is terrible given that SBS2011 ships with SP1 loaded.
yes , I have SBS2011 Also , and doesn’t work , ..
anyone have another solution for it ???
still using the full memory in my server.
SBS2011 here also. ADSIEDIT parameter set, multiple reboots and 2+ weeks later, STORE.EXE still consumes all available memory.
For Exchange Server 2010 in SBS2011, memory never exceeds minimum setting, regardless of max setting. This is a bug in Windows. BOTH Min and Max MUST be set to the SAME value or it just won’t work.
Pingback: Limiting Exchange 2010 SP1 Database Cache « EighTwOne (821)
Pingback: Limit the Amount of Memory that Exchange 2010 uses | Computer Repair, Networking, Servers, VMware, Virus Removal
Pingback: Exchange 2010 Store.exe using up RAM « Viral Rathod's Blog
Pingback: 2011, a short Retrospective « EighTwOne (821)
Pingback: Limit Memory Usage of store.exe – Microsoft Exchange | Windows Admin Notes
thank you for the important post, but i didn’t understand the following msExchESEparamCacheSizeMax to 131072 (4 GB = 4.194.304 KB / 32 KB) so let’s say if i wanna set the cache to 4GB shall i put 4194304 in the msExchESEparamCacheSizeMax.
Then number used is the number of pages; the cache size is determined by the page size used by the product. So, if you want 4 GB for Exchange 2010 (page size 32kb), you should use the value (4 GB = 4 * 1024 * 1024 = 4194304 KB and divide that by the page size = 4194304 / 32 = 131072. If you’d enter 4194304, you’ll set the page size to 4194304 * 32KB = 134217728 KB = (134217728 / 1024 / 1024) = 128 GB.
Hope this clarifies things.
so I made a mistake as i entered the 4194304 value i will correct it to 131072 which is enough for exchange 2010 sp2 20 users, right ?
Depends on user profile (i.e. usage pattern). 4 GB is more than enough; 1 GB should also do nicely (for 100 messages sent/rec daily with avg size of 75 KB, do calculation with around 6 MB database cache per user)
This grab all the memory behaviour causes issues with proactive monitoring tools as most will alert at a set memory threshold. We use 90% as a critical threshold but with Exchange 2010 you may as well not monitor it.
I set msExchESEparamCacheSizeMax to 196608, expecting it to use about 6 GB of RAM but turns out that it is only using about 800 MB, I have Exchange 2010 SP2. Is there a way to check the page size?
we have Exchange 2010 Mailbox server with 64GB RAM, for 1200 Users. How much i have to set msExchESEparamCacheSizeMax. Please give suggestion
Pingback: Antonio Arienzo the blog | Exchange 2010 Store.exe using up all the available RAM (High Memory Usage ) :
Worked for me. great article!
I have an Exchange 2010 box which normally consumes a full 20GB of RAM, and I find that this behavior chokes some other services I have running on the box and makes the whole thing go very sluggish.
I’ve decided to restrict it to 16GB, so I’ve used 256 for msExchESEParamCacheSizeMin and 524288 for msExchESEParamCacheSizeMax. However after 3 full days it now only uses a bit more than 1GB RAM.
Has anyone else seen this behaviour? Does anyone know what might be causing it?
I have the same problem, did you get this figured out?
Pingback: Exchange 2007 High RAM usage
Good article. But I gave the value (16*1024*1024)/32 to the max value and (4*1024*1024)/32 to min value and memory use is now 512Mb. When no values are entered it was 18Gb?
Did you get this resolved I have configured mine for a min size of
65536 and a Max Size of 524288 after over a week it is just above the min Cache size of 2.2GB Exchange 2010 SP2 Is it using the min as the max? has anyone figured out what the issue is?
Figured it out thanks to this post.
Use this formula for your math
To configure 5GB of memory, (1,048,576 * 5 = 5,242,880 / 32 = 163840) . msExchESEparamCacheSizeMax to 163840
Pingback: Limit rozmiaru bazy Exchange 2010 – plik store.exe « blog Daniela
Pingback: » Tweak Exchange 2010 Memory Usage SBITS.Biz
Pingback: 2012, a short Retrospective | EighTwOne (821)
Pingback: Limiting Exchange Server 2007 and 2010 Database cache
made me look like a hero! thanks for this post worked fantastic!!
Life saver. This was an excellent article as well as the hyperlinked followup for SP1. My excessive memory use was a red herring and I almost made a huge mistake. If I had not read this article first, I would not have known that 64GB of memory will net 44GB of memory usage by store.exe. The issue I was having when I noticed the memory consumption was a VMware issue addressed by a patch. Thanks for the save man. Definitely following this blog now.
I’m lost when it comes to ADSI Edit. Not seeing —> Configuration > Services > Microsoft Exchange > > Administrative Groups > > Servers > > InformationStore. I am on a SBS2011 SP1 server.
File > Connect to > Naming Context : Configuration > Services (in the tree) > ..
Pingback: EighTwOne 2013 Annual Report | EighTwOne (821)
Pingback: SBS 2011 RDWeb Shared Folders – An unexpected error occured
Hi Michel, We have ex2010 sp1 installed with 32 gb physical memory and we also have this issue always physical memory 30 gb utilised. We have only one server with all roles installed and have 240 user mailboxes and about 50 shared mailboxes. Sometimes we are not able to open EMS and EMC also because of this. What is the recommended size you would recommend for database cache.
I would recommend dimensioning the server properly and not fiddle around with these parameters. DB cache recommendation depends on user profiles, check http://technet.microsoft.com/en-us/library/ee832793%28v=exchg.141%29.aspx
Pingback: Techys2u Blog » Blog Archive » SBS 2011 Exchange Memory Usage Limits with side note for Exchange 2007
I set my max to 851968 (26 GB) and my min to 262144 (8 GB), but now store service never uses more than 16 GB. Before it was using 32 GB out of 48 GB that the server has and would get to 32 GB in less than a day. Now it has been running for a week and hasn’t crossed 16 GB. I would like it to use full 26 GB since server has plenty of RAM. Any idea/suggestions?
Pingback: EighTwOne 2014 Stats | EighTwOne (821)
Pingback: Limiter la mémoire consommée par Exchange 2010 | Obiyo Online
Pingback: Annual Report 2020 | EighTwOne (821)
Pingback: Limit Memory Usage of store.exe – Microsoft Exchange | Miscellaneous Items