the 5 layers of dynamics crm performance optimization

36
The 5 Layers of Dynamics CRM Performance Optimization Nuno Costa – Dynamics CRM Consultant

Upload: others

Post on 25-Nov-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

The 5 Layers of Dynamics CRM

Performance Optimization

Nuno Costa – Dynamics CRM Consultant

@CRMUG

About Me

Dynamics CRM Consultant • 7 years experience with Dynamics CRM

• MSCE, MCSA, MCSA Messaging Certified

@QuantusDynamics

http://quantusdynamics.blogspot.com

uk.linkedin.com/in/nuno1/

@CRMUG

Layers Diagram

@CRMUG

Client Layer – Browser

Internet Explorer - IE11 Local Intranet Zone

Integrated Authentication

Auto Logon

250MB cache

Reset Zoom Level to 100%

Increase Browser connections

http://bit.ly/UGIEConnections

Disable Compatibility settings

IE add-ons?

@CRMUG

Client Layer - Outlook Client Large deployments?

WCF Compression

Throttling client

synchronization processes

http://bit.ly/UGOutlookClient

DisableMapiCaching

(deprecated CRM 2013)

SQL CE4 (CRM 2011 RU15)

Office 64 bits

Outlook Filters

Office 2013 Add CRM add-in to

DoNotDisableAddinList

http://bit.ly/1yOIL4V

@CRMUG

Network Layer

Authentication

Kerberos

Compression

Caching

@CRMUG

Authentication - Kerberos NTLM Authentication Kerberos Authentication

@CRMUG

Kerberos - configuration Service Principal Names SPNs

IIS kernel Mode Authentication enabled

AD delegation, make sure the service

account is delegated for kerberos auth

IE CRM URL on local intranet or

trusted sites configured with Integrated

authentication and auto-logon

Enable UseAppPoolCredentials to True

DNS, preferably A record, try avoiding

CNAME*

Article Kerberos Configuration http://bit.ly/UGKerbConf

@CRMUG

Kerberos - Troubleshooting Microsoft PFE SPN spreadsheet

http://bit.ly/UGSpnPFE

Windows Kerberos logging

http://bit.ly/UGKerbLogging

Wireshark or MS Network Monitor

Article Troubleshooting Kerberos

http://bit.ly/UGKerberosFix

Lookout for duplicate SPNs

ldifde -f c:\spn_out.txt -d "DC=domain,DC=com" -l serviceprincipalname -r "(serviceprincipalname=*/*)" -p subtree

@CRMUG

Kerberos - Troubleshooting

@CRMUG

Network - Compression IIS Compression

IIS ARR

Hardware compression

@CRMUG

Network – WCF Compression

Enabling WCF Compression

@CRMUG

Network - Caching Web Accelerator – F5 Big-IP

Proxy caching – Bluecoat

IIS ARR 3.0

@CRMUG

Network - Caching

IIS Application Request Routing ARR 3.0

Caching & Compression

Warmup cache mode

http://bit.ly/UGARRCache1

Load Balancing

Health Monitor

http://bit.ly/UGARRInfo

@CRMUG

Server - Layer

IIS Optimization

Registry Keys

Multi-Role Deployment

Monitoring

@CRMUG

Server - IIS Optimization AppPool Recycling

Configure AppPool to recycle

out-of-hours

authPersistNonNTLM

Enable this setting to use the

same Kerberos ticket per TCP

session

Dynamic Compression

Not installed by default

@CRMUG

Server - Optimization Multi-tenant AsyncSelectMaxItems

EnableRetrieveMultipleOptimization

AsyncRemoveCompletedWorkflows

PreferredDC

OrgDBOrgSettings tool

TCPWaitTimeDelay and MaxUserPort

Disable Loopback

Dynamics CRM Best Practices Analyser

@CRMUG

Server – Best Practices Analyzer

Install Best Practices

Configuration Analyzer 2.0

http://bit.ly/UGCONFAnalyzer

Download CRM Best Practices

Analyzer

http://bit.ly/UGCRMAnalyzer

@CRMUG

Server – OrgDBSettings tool The OrgDBOrgSettings tool

gives administrators the ability

to implement specific updates

that were previously reserved for

registry implementations.

http://bit.ly/OrgDBSettings

EnableRetrieveMultipleOptimization

SkipGettingRecordCountForPagi

ng

DisableIECompatMode

ClientUEIPDisabled

CRM Solution – PFE Tool http://bit.ly/OrgEditorPFE

@CRMUG

Server – ERMO EnableRetrieveMultipleOptimization

The ERMO setting is commonly used to

limit the duration of certain long running

queries (specifically, to overcome issues

related to local or deep business unit

access within Microsoft Dynamics CRM

2011 security roles.

Default value is set to 0 – Automatic the

systems figures out the best setting to use.

Use in most cases – especially useful with

larger data sets in which the number of

visible records varies a lot between

different users.

Setting to 1 if a user can only see the

records he or she owns and that number of

records is relatively small (ideally less than

a few thousand)

Setting to 2 Consider using when most

users have Read access to most records

without the use of sharing, and most users

are members of a small number of teams

and have access to records in a small

number of business units.

Setting to 3 For smaller organizations, this

format of security filtering is often

sufficient and may not require as much

memory as the default ERMO setting (CRM

4 default)

@CRMUG

AsyncSelectMaxItems evens the load of the

Asynchronous service per organization

eliminating a possible bottleneck

Multiple Organizations with different

workload can cause bottlenecks on the

Asynchronous service

http://bit.ly/1zBnVcp

Server – Multi-tenant Asynchronous Service

@CRMUG

Distributed Server Roles

@CRMUG

Server – Scaling SQL servers

Multiple SQL servers

per organisation

@CRMUG

Server - Monitoring

Perfmon + PAL Performance Analysis of Logs

http://bit.ly/UGPALLogs

@CRMUG

Database Layer Indexes with SQL DMVs

Max Parallelism

SQL Maintenance jobs

CRM Built-in jobs

SQL RCSI

AsyncOperationBase table Script to clean-up completed jobs

http://bit.ly/UGAsyncTable

PrincipalObjectAccess - Monitor indexes

@CRMUG

Databases - Indexes

Non-Clustered Indexes contains pointers which

reference the location of the data. You can have many

non-clustered indexes.

Clustered indexes, Sort the column

'Amount' descendent on the table itself. You can only

have one clustered index.

@CRMUG

Database - Indexes DMV's Dynamic Management

Views

Index

sys.dm_db_index_usage_stats

sys.dm_db_missing_index_colu

mns

sys.dm_db_missing_index_detail

s

Execution

sys.dm_exec_query_stats

sys.dm_exec_requests

DMV Scripts:

http://bit.ly/UGDmvMon

SQL Maintenance Jobs:

Rebuild indexes

EXEC sp_msforeachtable 'DBCC

DBREINDEX("?"," ",80)'

Update statistics

EXEC sp_updatestats;

@CRMUG

Reschedule CRM Built-in maintenance jobs

CRM Maintenance Job

Editor

Re-schedule the jobs

to run out-of-hours

Disable the job by

setting Next Run time

e.g. 01/01/2099

Tool can be

downloaded from

codeplex:

http://bit.ly/UGJobEdit

or

@CRMUG

Database – Optimization Max Parallelism set to 1

Recommended disabling parallel

plan queries. By default is set to 0 it

can use all CPUs up to 64.

RCSI – Read Committed Snapshot

Isolation - http://bit.ly/UGRCSIDB

Reduces deadlocks

For optimal performance keep

Tempdb, transaction log files and

datatabase files on separate

physical disks

1 tempdb file per CPU

Set the recovery mode to simple

Separate disks

http://bit.ly/UGTempDB

SQL Governor

Multitenancy resource isolation for

multiple client workloads.

http://bit.ly/UGSQLGovern

Row/Page Compression CPU Increase

@CRMUG

Database – Monitoring Perfmon

Disk I/O

> 15ms Not good

SQL DMVs

SQL Profiler

SQL sp_whoIsActive

Monitor CXPACKET wait statistics

to check if MAXDOP is

performing well for you .

@CRMUG

Database - Monitoring

Sp_whoIsActive http://bit.ly/UGDBSPWhoIs sp_whoIsActive @get_task_info = 2, @get_plans = 1

Video Tutorial: http://bit.ly/UGWhoIsTut

@CRMUG

Customisations Layer Security - keep it simple

Use Teams to share

records, ideally Access

Teams

avoid deep BU access

levels

Avoid sharing records

with users. E.g. use teams

sharing is a last resort

@CRMUG

Customisations Layer SkipGettingRecordCountForPaging

(removes the Paging counter)

Use more plugins/Workflows then

Business Rules instead of Javascript

removing the load on the browser

Combine webresources to one

javascript file

Avoid Sub-grids on the form

Disable Presence*

Collapse Tabs e.g. Maps &

iFrames

Limit Quick Find columns/results

Monitor Performance with F12

Developer Tools and

CTRL+SHIFT+Q

Minify your JavaScript code

@CRMUG

Customisations – JavaScript Perf

@CRMUG

Customisations – JavaScript Perf

Any Questions?