Skip navigation
Tuning .NET for the Exchange 2013 Information Store - come to Exchange Connections to learn more!

Tuning .NET for the Exchange 2013 Information Store - come to Exchange Connections to learn more!

As the chair of Exchange Connections (Las Vegas, Oct 1-3), one of the more important tasks that lands on my desk is to review draft decks for all of the presentations that will be delivered at the Conference. This activity takes quite a lot of effort but it’s a critical part of ensuring that attendees get relevant, up-to-date, and technically accurate information during the sessions.

The nice thing from my perspective is that I learn from the reviews. There’s always something new or a twist on a well-known topic that attracts the eye and so it was during the most recent reviews when I had the chance to look over a deck from Microsoft’s Jeff Mealiffe titled the Tao of Exchange 2013 Sizing.  

As evident in his “Perf Guy” EHLO posting, Jeff is a real expert in all matters to do with Exchange Server sizing and I had few comments to offer. The thing that caught my eye was the assertion that it is best practice to install the Hotfix rollup for the .NET Framework 4.5 to help Store performance by reducing the memory consumption of each worker process and by decreasing the CPU cycles expended in the .NET “Garbage Collector”.

As you probably know, Microsoft rewrote the Information Store in managed code for Exchange 2013 and as such, the new Store (aka the “managed Store”) makes extensive use of the .NET Framework. It makes sense that any improvements made in .NET should be investigated to see whether they apply to Exchange. With Exchange 2013 you have a separate worker process for every database mounted on a server so anything that reduces their memory consumption must be regarded as a very good thing.

Looking through the description provided in KB2803755 (for Windows 2012, see KB2803754 for Windows 2008 R2), it seems like this is the interesting fix that applies to Exchange:

A .NET Framework 4.5-based application that excessively uses ExecutionContext objects or WCF may result in too many objects being pinned on the Garbage Collector heap. This causes heap fragmentation along with an increase in memory and CPU usage by the Garbage Collector. 

This hotfix prevents objects from being pinned in certain cases.

To enable the hotfix, you have to get the code from Microsoft, install it on your server, and then create a new DWORD registry value at:

HKLM\Software\Microsoft\.NETFramework\DisableRetStructPinning 

Set the value to 1.

You’ll have to restart the server to make the change effective. The exact amount of resources saved by applying the hotfix depends on the number of Store worker processes that are active on the server. On a "typical" Exchange mailbox server, it might amount to a few hundred megabytes. Nothing in today's terms, but scarey when you think of how scarce memory once was. I guess that's progress.

This kind of insightful and helpful information is exactly the kind of thing with which we want to provide Exchange Connections attendees over the three days of the conference covering topics such as ActiveSync, hybrid connectivity between Exchange and Office 365, modern public folders, and high availability. I anticipate a lot more knowledge will be shared at the conference. 

Update (live from Connections): During his well-attended session, Jeff made the point that the gain realized through applying the hotfix is cumulative. In other words, when you run multiple databases on a server, the gain is achieved for each of the Store worker processes. In an answer to a question whether the same fix can be applied to Exchange 2010 (because that version also uses the .NET Framework), Jeff said that whereas some gain might be seen, the new Managed Store architecture in Exchange 2013 and the division of workload across multiple Store worker processes is key to the gains that they've observed.

Follow Tony @12Knocksinna

TAGS: Office 365
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish