Freigeben über


Exchange 2013 – Memory (RAM) allocation by the store with an example

First, a reminder of the theory:

  • Exchange store is comprised of 3 services:
  • msexchangerepl.exe = Replication Service Process
  • Microsoft.Exchange.Store.Service.exe = Store Service Process (or Controller)
  • Microsoft.Exchange.Store.Worker.exe = Store Worker Process (1 per DB)

•Algorithm will allocate total ESE cache available for all store worker processes based on physical RAM

– ~25% of total memory allocated to ESE cache

•ESE cache allocated to each database (store worker process) based on number of local database copies and MaximumActiveDatabases configuration

– Static amount of ESE cache allocated to passive and active database copies

•Passive database allocates 20% of max ESE cache target used for active database

– Store worker process will only use max cache target when operating as active

•Max cache target computed at service process startup

– Restart service process when adding/removing copies or changing maximum active database configuration

 

Example/illustration:

1- Let’s say your server has 64GB RAM

2- Exchange 2013 store will calculate a max cache target

25% x 64GB RAM = 16GB

That means that potentially, Exchange Store can allocate and use 16GB RAM maximum.

image

That would be if your server is hosting active databases only: as stated above, for passive databases, Exchange will allocate less memory.

See the point 3- below:

3- Say you will host 10 databases on your server.

The Max cache target computed at service process startup (Microsoft.Exchange.Store.Service.exe) will be evenly distributed between each database : 16GB / 10 = 1.6GB.

For databases that are active on this server, Exchange Store will use 1.6GB cache for these databases.

But for the passive ones on this server, it will use only 20% of the 1.6GB that the Store service that is 327.68MB

image

So for 5 Passive databases and 5 Active databases, the RAM usage for the Store processes will be

( Max allocated cache per DB x nb active DBs ) + 20% x (Max allocated cache per DB x nb of passive DBs)

( 1.6 x 5 ) + 20% x ( 1.6 x 5 ) = 9.6GB

If you activate all 10 databases on this server, then the RAM usage will then just be :

1.6 x 10 = 16GB.

 

Download the tool that produces the nice graphs and examples above !

image

Comments

  • Anonymous
    January 01, 2003
    Hi Sammy, Excellent post. Few observations / oddities: - The first graph is bit odd. Scale starts at -6 GB and looks off due to 3D (ESE bar more or less in the 10GB region) - 20% of 1.6 GB is 327 MB, not 163 .. - Second graph scaling also looks odd, more like 1/10th instead of 1/5th) - Max ESE target is 16 GB divided over 10 DBs is 1.6 GB/db in 5 act / 5 pas, shouldn't that then be 5 x 1.6GB (active) + 5 x 163 MB (passive) = 8 GB + 815 MB = 8.8 GB, not 4.8 GB ? Or am I missing something here ..
  • Anonymous
    February 04, 2014
    Thanks the most understandable post I saw about this subject
  • Anonymous
    February 04, 2014
    quick question if I have 10 databases all actives would I have this: "The Max cache target computed at service process startup (Microsoft.Exchange.Store.Service.exe) will be evenly distributed between each database : 16GB / 10 = 1.6GB. For databases that are active on this server, Exchange Store will use 1.6GB cache for these databases." and not this: If you activate all 10 databases on this server, then the RAM usage will then be : 819.2 x 10 = 8192MB = 8GB.
  • Anonymous
    February 06, 2014
    Hi guys, many thanks for your comments, and both of you are right ! I messed up the numbers as I worked on 2 different examples in the background with my Excel spreadsheet (1 with 32GB RAM => 25% of 32GB = 8GB, and 1 with 64GB RAM). You showed that you fully understood the memory allocation process and that's very good :-) I'm correcting this rightaway, and as a bonus I'm posting my Excel spreadsheet as well, where you just enter the amount of RAM and the number of DBs, and you just see the tables, graphics and text updating accordingly. Thanks again, you guys rock ! Cheers, Sam.
  • Anonymous
    February 06, 2014
    @Michel: you're also right for the 5 act / 5 pas : with a 64GB RAM example (25% x 64GB = 16GB for our store worker processes), it's 5 x 1.6GB (active) + 5 x 327MB (passive) = 9.6GB... thanks again, and sorry for messing up the numbers in my initial post ! Have a good one, Cheers, Sam