My colleague Eric Regnier has done some great work on CRM Performance Testing and would like to share what he shared with me….
For SQL Server indexing and tuning:
- Query Tuning: http://technet.microsoft.com/en-us/library/cc917579.aspx
- Understanding and resolving Microsoft SQL Server blocking: http://support.microsoft.com/kb/224453
- Optimizing Microsoft SQL Server Performance: http://support.microsoft.com/kb/110352/en-us
- SQL Server Clustered Indexing Best Practices: http://technet.microsoft.com/library/Cc917672
- Improving SQL Server Performance: http://msdn.microsoft.com/en-us/library/ff647793.aspx
CRM SDK call. i.e. when you do Data Migration jobs. Some of those might or might not increase perf:
- Leverage ExecuteTransactionRequest as much as possible for dependent records otherwise use ExecuteMultipleRequest
- Generate GUIDs of parent records within console instead letting CRM generate the GUIDs. This way will allow the script to create parent and child records in one transaction and reduce the complexity to O(n).
- Increase multiple request batch size to 2000 instead of 800. Requires PowerShell https://msdn.microsoft.com/en-us/library/gg334634.aspx. Should be put back to 1000 afterwards.
- Split console by entities. One Console per entity. I was able to achieve over 500000 per hour in a previous project with that way.
- Set the regarding field of the email once all emails were created in the system. 1st create emails then 2nd update Regarding
- Turn off database replication during DM
- Run the CRM Diag tool: <CRMUrl>/tools/diagnostics/diag.aspx
1. Only single Async CRM Server is running. Should be able to increase performance by having multiple async servers.
2. Enable the EnableRetrieveMultipleOptimization registry key
3. WCF Compression enabled
4. CRM SSL enabled
5. IIS Dynamic Compression is enabled
6. IIS system.web\caching\outputCaching omitVaryStar setting enabled (https://blogs.msdn.microsoft.com/crminthefield/2014/12/19/static-content-not-cached-properly-in-dynamics-crm-due-to-vary-header)
7. AsyncOperationBase is truncated/cleared?
8. Anti-virus excludes CRM or disabled
9. F5 load balancer compression enabled
- Review Parental and Cascade All entity relationships settings for entities.
- Review the usage of Sharing. In custom workflow activities and plugins.
- Sharing with previous owner system setting off
- Disable workflow job retention logs from processes and plugins. This will help reduce the asyncoperation table.
- Review Business Rule scope configuration that are set to Entity. These will trigger at platform level.
- Review CRM traces and all frontend and backend servers:
- Sandbox logs and server level logs. Recommendation: Set at Errors only.
- Purge and review log configuration:
- Custom log entities and custom logs (e.g. NLog)
- Custom staging entities
- asyncoperation table
- Review audit settings. Only required entities and fields.
- Review Find Columns of Quick Find Views. Recommendation: max 10 fields per entities
- Review plugins on Retrieve if applicable
- Review form load performance with CRM Performance Center (CTRL+Shift+Q). Recommendation
- Tabs collapsed by default will increase load time
- No BPF. BPF take a lot of time to load
- Use subgrid when necessary and leverage associated grids in navigation instead.