Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to improve Microsoft CRM Async Performance on multi-core servers


View products that this article applies to.

Symptoms

The Microsoft CRM Async Service may show signs of high CPU usage and high memory usage when a high transaction load and a large number of workflows are in use with Microsoft CRM.

↑ Back to the top


Cause

Numerous and sometimes complex workflows have been created and used in a Microsoft CRM Async Service with hundreds or thousands of concurrent users on a multi-processor server but the CRMAsyncservice.exe is only performing garbage collections concurrently on a single CPU or single core of a multi-core CPU.

↑ Back to the top


Resolution

The Microsoft CRM web site if hosted on a multi-processor/core server will automatically be using server Garbage Collection mode, but for managed Microsoft .Net programs like the CRMAsyncService.exe, they will default to the workstation garbage collection mode. Note that this resolution will only apply if Microsoft Dynamics CRM is installed on a multi-processor or multi-core server since the crmasyncservice will aways be forced to use the Microsoft .Net workstation garbage collection mode on a single CPU (non multi-core) server.

In order to allow the CRMAsyncService.exe to take advantage of all the processors/cores on a server, you can add the following element to a CRMAsyncService.exe.config file and place it in the same directory as the CRMAsyncService.exe program, typically in the “C:\Program Files\Microsoft Dynamics CRM\Server\bin” directory if you haven’t changed the default installation location for the Microsoft CRM Server. If the Microsoft Dynamics CRM application was installed to another directory, the installation path can be found in the registry on the Microsoft Dynamics CRM Server by looking at the registry key, HKEY_LOCAL_MACHINE\Software\Microsoft\MSCRM\CRM_Server_InstallDir.

Note that these changes will take effect the next time that you restart the Microsoft CRM Async Service.  Also note that if you already have a crmasyncservice.exe.config file, to place this information for the <gcServer enabled=”true”/> into the Runtime and configuration tags as seen below.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <runtime>
      <gcServer enabled="true"/>
   </runtime>
</configuration>

As with any changes, although this can give much better throughput for the Microsoft CRM Async Service and workflows able to be executed in a given time frame, it is best to measure the changes before and after implementing this change.  The CRM Async Service perfmon counters can be used for this as well as counters for Memory, .Net CLR Memory, and Processor.  There are also other factors such as customizations, workflows, and SQL Server performance that plays a factor in overall Microsoft CRM Async Service performance, but enabling gcServer mode is a great way to improve performance on multi-processor servers with minimal effort.

↑ Back to the top


More Information

References:  “Roadmap for garbage collection in the Microsoft.Net Framework”  http://support.microsoft.com/kb/317866
“<gcServer> Element”  http://msdn.microsoft.com/en-us/library/ms229357(v=VS.85).aspx
“.NET Garbage Collector PopQuiz – Followup”  http://blogs.msdn.com/b/tess/archive/2007/04/10/net-garbage-collector-popquiz-followup.aspx
“Server, Workstation, and Concurrent GC”  http://blogs.msdn.com/b/clyon/archive/2004/09/08/226981.aspx

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2489162
Revision : 1
Created on : 1/7/2017
Published on : 2/18/2011
Exists online : False
Views : 595