I've put together a high-level list of optimizations for dynamics CRM to centralise information for myself, and thought sharing would be helpful for someone, I'll keep this list updated as I find more information., PLEASE ADD more optimizations tips & tricks to this article.

Authentication

The number of authentication request's and authentication challenges takes valuable seconds deteriorating performance.

Resources:

IIS

  • AppPool Recycling
    • Configure to recycle after hours.

CRM Registry Keys

A number of tweaks can be done on the CRM side to improve performance.

  • You can control the size of the Workflow table by deleting completed Workflows with a registry key, this is a nice way to improve performance on the database side, however this can only be applied if you don't need the workflow history.
    • Name: AsyncRemoveCompletedWorkflows
    • Type: DWORD
    • Value: 1
  • Improve SQL Performance EnableRetrieveMultiple
    • Type: DWORD
    • Value: 2 (Decimal)
    • Fixes a number of issues around the SQL tempdb database and improves performance
    • http://support.microsoft.com/kb/2535245
  • Disable the email pop-up reminder to speed up load times
    • Name: DisablePendingEmailReminder
    • Type: DWORD
    • Value: 1
  • Set a preferred Domain Controller to speed up AD checks
    • Name: PreferredDC
    • Type: String
    • Value: DC_Name

There are a number of registry keys targeting different types of performance issues and types of environments, Microsoft is now releasing with each update Roll Up a package named:'tools'.This package contains a tool that can implement a number of updates/optimizations which were previously reserved for registry implementations, this way makes it easier to enable optimizations centrally and avoid creating registry keys across multiple front-end servers.

http://support.microsoft.com/kb/2691237

e.g number of registry keys part of RU6

  • DisableSmartMatching
    • Default Value – False
  • AutoCreateContactOnPromote
    • Default Value - True
  • BackgroundSendBatchFile
    • Default Value – 10
  • DisableInactiveRecordFilterForMailMerge
    • Default Value - False
  • LookupNameMatchesDuringImport
    • Default Value - False
  • EnableRetrieveMultipleOptimization
    • Default Value - 1
  • DoNotIgnoreInternalEmailToQueues
    • Default Value - False
  • SkipSuffixOnKBArticles
    • Default Value - False
  • SkipGettingRecordCountForPaging
    • Default Value – False


Database

Outlook Client

Note: Make sure you enable IIS WCF compression from point 2. IIS

Internet Explorer

  • Ensure CRM url is added to the local intranet zone
  • Authentication Options
    • AutoLogon
    • Windows Integrated Authentication
  • Reset Zoom level for new windows and tabs
  • Disk space for temporary internet files
    • 250MB
  • Increase IE connections to the server with Registry Keys

Email Router

  • Reduce the configuration update period
    • Open the Microsoft.Crm.Tools.EmailAgent.xml in notepad and edit the following line to 86400000 this will set the email router to update the user list once a day, this is important if you have a large number of users in your environment.
      • <configupdateperiod>86400000</configupdateperiod>
  • Increase the number of emails to process on each batch
    • On the same file as above you need to add an extra section to override some of the settings, this will stay included on the  <systemconfiguration> section:</systemconfiguration>
      •  <provideroverrides>
      •   <cachecapacity>1024  </cachecapacity>
      •   <pendingstatusdelay>300000 </pendingstatusdelay>
      •   <sendingstatusdelay>1800000 </sendingstatusdelay>
      •   <maximumdeliveryattempts>10 </maximumdeliveryattempts>
      •   <retrievemessagecount>10  </retrievemessagecount>
      •   <batchsize>50 </batchsize>
      •   <requestbatchsize>50 </requestbatchsize>
      • </provideroverrides>
  • for more information on how to use <proveroverrides> </proveroverrides> go to:
  • http://support.microsoft.com/kb/972150
  • If you have more than 5000 users in your environment you will need to increase email router limits on how many users to load from CRM by setting MaxRowsPerPage on the front-end server:
    • Name: MaxRowsPerPage
    • Type: DWORD
    • Value: Number_of_rows (Decimal)

    SQL Jobs

    Configure the below SQL script as a job and run every 30min, if the email router crashes, the job will check for pending emails and sends an email.

    Declare @total int

    Declare @oldest int

    Declare @newest int

    Declare @subject75 varchar(max);

    Declare @subjectOldest varchar(max);

    set @total = (

                            select COUNT(*) as total

                            FROM FilteredActivityPointer

                                where activitytypecode = 4202  AND--Email

              statuscode = 6 --pending

                )

             

    set @oldest = (

    select top 1 DATEDIFF(mi,FilteredActivityPointer.createdon,GETUTCDATE()) as minutes

    FROM FilteredActivityPointer

                                where activitytypecode = 4202  AND--Email

              statuscode = 6 --pending

          ORDER BY minutes DESC                            

    )

    set @newest = (

    select top 1 DATEDIFF(mi,FilteredActivityPointer.createdon,GETUTCDATE()) as minutes

    FROM FilteredActivityPointer

                                where activitytypecode = 4202  AND--Email

              statuscode = 6 --pending

               ORDER BY minutes ASC         

    )

    -- Sets the Email Subject

    set @subjectOldest = 'Email router - emails pending on CRM with' + ' ' + convert(varchar(max),@oldest)+ ' ' + 'minutes delay';

    set @subject75 = 'Email router - More than 75 emails pending';       

    --If more than 75 emails and the oldest bigger than 30minutes send notification

    IF (@total > 75) AND (@oldest > 30)

    BEGIN

    EXEC msdb.dbo.sp_send_dbmail

    @profile_name = 'CRM Production',

    @recipients = 'email@domain.com',

     @subject = @subject75;

    END

    --If Oldest email older than 60 minutes send notification

    IF @oldest > 60

    BEGIN

    EXEC msdb.dbo.sp_send_dbmail

    @profile_name = 'CRM Production',

    @recipients = 'email@domain.com',

     @subject = @subjectOldest;

     

    END

    Resources

    1. [CRM 2011] Optimizing and Maintaining the Performance of a Microsoft Dynamics CRM 2011 Server Infrastructure. http://www.microsoft.com/en-us/download/details.aspx?id=27139
    2. [CRM 2011] Optimizing and Maintaining Client Performance for Microsoft Dynamics CRM 2011 and CRM Online. http://www.microsoft.com/en-us/download/details.aspx?id=23261
    3. [CRM 4][NB] Security and Authentication in Microsoft Dynamics CRM: Connectivity and Firewall Port Requirements in On-Premise Deployments. http://www.microsoft.com/en-us/download/details.aspx?id=12774
    4. [CRM4][NB] Security and Authentication in Microsoft Dynamics CRM: The Microsoft Dynamics CRM Security Model. http://www.microsoft.com/en-gb/download/details.aspx?id=12108
    5. [CRM4] Outlook Synchronization in Microsoft Dynamics CRM 4.0. http://www.microsoft.com/en-us/download/details.aspx?id=17594
    6. [CRM4] [NB] Offline and Online Synchronization in Microsoft Dynamics CRM. http://www.microsoft.com/en-us/download/details.aspx?id=2737
    7. [CRM4] Sharing Data across Microsoft Dynamics CRM Deployments. http://www.microsoft.com/en-us/download/details.aspx?id=10151
    8. [CRM4] Optimizing and Maintaining Microsoft Dynamics CRM 4.0. http://www.microsoft.com/en-us/download/details.aspx?id=3997
    9. [CRM2011] [Email Router] How to configure the Microsoft Dynamics CRM on-premises and Microsoft Dynamics CRM Online E-mail Router in different deployment scenarios. http://www.microsoft.com/en-us/download/details.aspx?id=21445
    10. [CRM 2011] Deploying Microsoft Dynamics CRM 2011 and CRM Online Solutions from Development through Test and Production Environments. http://www.microsoft.com/en-us/download/details.aspx?id=27824