CRM 2011 Performance Tuning Lesson Learned

Oh well, when it comes to tuning the CRM 2011 application, there are many things we can do.  The project that I am working on for the past two years is finally finished with performance tuning, I like to write down a few things that I learned from the tuning exercise just in case that I need to do it in the future.  Thanks to my friend, Grant Geiszler for sharing some of the information with me.

  1. Infrastructure

    • Reduce network latency, make sure the network routings to the servers are correct.
    • Make sure the SPNs are setup correct between servers and the different service accounts in used.
    • Make sure the IIS AppPool Recycle time is adjusted.
    • Make sure the load balancer are setup correctly using the correct profile.
      • If using F5 load balancer, please review the Deployment Guide provided by F5. The deployment guide is written for Microsoft Dynamics CRM 4.0 however most of the configuration applies to CRM 2011 as well. The profile that we used has the following settings.

         ltm profile tcp pr_irpc_tcp_120min {
            ack-on-push enabled
            bandwidth-delay disabled
            defaults-from tcp
            idle-timeout 7200
            nagle disabled
            proxy-buffer-high 131072
            proxy-buffer-low 98304
            receive-window-size 65535
            send-buffer-size 65535
            slow-start disabled
  2. Customization/Coding Optimization

    • Reduce the # of REST/SOAP calls, consolidate the client-side calls into a server side plug-in.
    • If you are using the REST endpoint to retrieve related information, only return the fields that are needed.  If returning all of the fields from an entity, it’ll drag down the performance because the return page-size.  We have entities storing a lot of data, the return page-size was up to 5MB, after the optimization and only returning the fields that we need, the page-size reduced to KB.
    • Avoid registering too many synchronous plug-ins, try to convert some of the plug-ins to asynchronous when possible.
  3. CRM Optimization

    • Enable authPersistNonNTLM.
    • Enable WCF compression.
    • Turn off IM Presence Functionality if not needed by updating the IsPresenceEnabled field to false in the OrganizationBase table.
    • Add EnableRetrieveMultipleOptimization (value 2) to the registry under HKLM\Software\Microsoft\MSCRM.
    • Add MaxUserPort (value 65534) and TcpTimedWaitDelay (value 30) to the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters.
    • Monitor the AysncOperationBase table.  Schedule a periodic job to clean up the AsyncOperationBase table.  More information on removing the records from the AyncOperationBase table and to schedule a job to clean up the table, please refer to KB 968520.
    • Reschedule the CRM 2011 Maintenance Jobs. By default CRM 2011 creates 6 maintenance jobs which are scheduled to run daily.  Depends on when the CRM Organization is created, the jobs may run when users are in the system.  You may download the CRM 2011 Maintenance Job Editor Tool to reschedule the jobs.  More information on the tool and how to use the tool, the premier team wrote a post on their blog.
  4. SQL 2008 Optimization

    • Set degree of parallelism from 0 to 1. This disables the parallel execution of the simultaneous operations on the SQL server.
    • Turn Read Committed Snapshot On.
    • Configure the TempDB Drive using the SQL best practice.
    • Validate the Max/Min Memory Configuration.
    • Validate Processor Configuration is set to use Normal mode and not fiber mode.

Anyway, I am sure there are many more optimization that you can do to the Outlook client, IE and the client OS. I hope the above tips can give you a head start.