SlideShare a Scribd company logo
1 of 38
Download to read offline
Dynamics AX Performance
         Tuning
Martin Zhen
Principle technical consultant @ OutsourceAX Development
Martin.zhen@outsourceax.com
About OutsourceAX Development

OutsourceAX Development is an offshore Dynamics
   AX Development provider, providing Dynamics
   AX development/support services to Microsoft
   Dynamics Partners and Customers.
Agenda

 Performance Tuning
 System monitoring/tooling for SQL

 Problem solving strategy

 Dynamics AX Trace Parser Tool

 Performance Analyzer for Microsoft Dynamics

 Tuning Strategy

 Solid State Drives
System monitoring/tooling for SQL
• SQL Server Profiler
• System monitoring / Perfmon / PAL tool
• Activity Monitor (SQL Server Management Studio)
• Event logs, SQL logs
• Dynamic Management Views (DMVs) / standard reports
• SQL trace (sp_trace TSQL)
• System Stored Procedures (sp_who, sp_lock…)
• DBCC statements
• Built-in functions (@@CPU_BUSY, @@CONNECTIONS…)
• Trace Flags
• Database Engine Tuning Advisors
http://msdn.microsoft.com/en-us/library/ms179428.aspx
Evaluating SQL Server Performance
http://msdn.microsoft.com/en-us/library/ms179428.aspx
Evaluating AX SQL Performance
• First question to ask
   -- Identified issue
        o Clear repro on standard/partner/customer environment
   -- Unidentified issue
        o No idea when it happens and/or what functional process(es) is/are slow
• Second question to ask
  -- What are the expectations? What is an acceptable performance?
  -- For critical processes; what is the maximum time window?
  -- Clear goal to work towards
Define the tuning strategy
Tuning strategy
  – Identified issue
  – Unidentified issue
Identified issue
• Reproducible only in customer's environment
  – Check hardware
  – Check software, settings and setup
  – Analyze the process (Trace Parser, Profiler…)
• Reproducible in any environment (with or
  without specific dataset)
  – Analyze the process (Trace Parser, Profiler…)
Unidentified issue
• Check hardware
• Check software, settings and setup
• Long term data collection (AXPERF, IDM)
Check Hardware: Tools
• Performance Monitoring (Perfmon)
   – Under OS Administrative Tools
   – Reliability and Performance Monitor (Windows Server 2008)
• Microsoft Network Monitor (Netmon)
   – Minimum client-server network requirements
       • Bandwidth >= 100 mbps
       • Latency <= 5ms
   – Minimum server-server network bandwidth is 1 gbps
   – Netmon v3.2 for Windows Server 2003 and 2008 download
       • http://www.microsoft.com/downloads/details.aspx?familyid=f4db40af-1e08-4a21-
         a26b-ec2f4dc4190d&displaylang=en
Check Software, Settings and Setup: References

• System requirement guides (see previous slides)
• For SQL Server:
   – Latest Service Pack from http://support.microsoft.com
   – Recent CU Package from http://support.microsoft.com
• For Dynamics AX:
   – Latest Service Pack from https://mbs.microsoft.com/partnersource
   – Recent Rollup package from PartnerSource or contact Microsoft Support
• For SQL Server Settings:
   – AX Performance team blog:
     http://blogs.msdn.com/axperf
Check Software, Settings and Setup

• Disk setup
   – AX data file(s), transaction log file and Tempdb on dedicated separate
     LUNs.
       • AX data file(s): RAID 0+1, or 10 preferred
       • AX transaction log file: RAID 1, 0+1, or 10 preferred
       • Tempdb database files: RAID 1, 0+1, or 10 preferred
   – The TempDB is heavily utilized when the Read Committed Snapshot
     Isolation (RCSI) is activated, for Sort operations and Intermediate join
     results. To get an additional performance gain Tempdb should be properly
     sized and should have as many data files as core CPUs.
   – Check Disk sector alignment as it can have a serious impact on
     performance of the system. More information on how to optimize can be
     found here:
       • http://support.microsoft.com/kb/929491
       • http://blogs.msdn.com/jimmymay/archive/2008/10/14/disk-
          partitionalignment-for-sql-server-slide-deck.aspx
Check Software, Settings and Setup
• SQL Server Settings
   – AX Maximum server memory set correctly. As a guideline: available
     server RAM - 2GB (for OS)
   – Processor affinity set to 0 (use all CPU cores), Boost SQL Server priority
     setting disabled.
   – Max Degree of Parallelism (Maxdop) set to 1. The reason for this is
     that when you have more than 1 here during business hours activity
     SQL-Server uses more than one processor for calculating one
     statement. If this is a long running statement it gets split by the
     number you set by this value and every processor has to wait till the
     other ones have completed.
   – Same collation settings for Tempdb (system DBs) and AX DB which
     normally matches the Server Collation setting default.
   – Named pipes protocol disabled if not used. Can be disabled via SQL
     Server Configuration Manager (SQL Server Network Configuration).
Check Software, Settings and Setup
• Database Settings
   – Read Committed Snapshot Isolation (RCSI) set to on. This isolation level
      allows greater concurrency between read and update transactions.
      The effect of this isolation level is that a read operation does not block
      (and cannot be blocked by) concurrent update operations.
       • http://technet.microsoft.com/en-us/library/ms175095.aspx includes complete
         instruction on enabling RCSI
       • http://technet.microsoft.com/en-us/library/ms188277.aspx includes a
         discussion contrasting Read Committed Snapshot Isolation and Read
         Committed Isolation.
   – Verify that compatibility level of AX database is to 90 (SQL 2005) or
     100 (SQL 2008).
   – Auto Create Statistics and Auto Update Statistics set to True.
   – If Autogrowth is configured, use MB (usually 100-500) rather than
     percent for both data and log files.
   – Auto Shrink always set to False.
Check Software, Settings and Setup
• SQL OS settings
   – Lock pages in memory set on SQL server for the account that has
     permission to run the Sqlservr.exe.
   – This is an important setting as it can reduce paging of buffer pool
     memory in the 64-bit version of SQL Server 2005.
   – More info can be found in KB 918483: How to reduce paging of buffer
     pool memory in the 64-bit version of SQL Server 2005
     (http://support.microsoft.com/kb/918483 )
• SQL administration
   – Check if index defragmentation (rebuild) is done on a regular base.
     There should be a maintenance job for this task and current state of
     index fragmentation can for example be verified with DMV
     sys.dm_db_index_physical_stats.
   – Check if update statistics is done
Check Software, Settings and Setup
• SQL Trace Flags for AX
  – Enable 1224 that changes the default behaviour for
    lock escalation.
  – Enable 7646 to help reduce contention on the internal
    full text table.
  – Enable 4136 to address the parameter sniffing issue.
  – Enable 4199 to allow the AX kernel that benefit from a
    more efficient execution plan when 4199 is enabled.
  http://blogs.msdn.com/b/axinthefield/archive/2010/11/
    04/sql-server-trace-flags-for-dynamics-ax.aspx
Check Software, Settings and Setup
• AOS settings
   – Maximum open cursors parameter should not be changed from
     default value of 90.
   – Maximum buffer size should not be changed from default value of
     24Kb.
   – Allow INDEX hints in queries setting should be disabled.
   – Disable setting “Enable breakpoints to debug X++ code running on this
     server“.
   – Use literals should be off by default, use only in specific cases to avoid
     for example parameter sniffing.
   – Array fetch ahead parameter should not be changed from default
     value without a valid reason.
   – No tracing should be activated in production system. See Microsoft
     Dynamics AX Server Configuration Utility, Tracing tab page AND
     Microsoft Dynamics AX Configuration Utility (on AX client side),
     Tracing tab page.
Check Software, Settings and Setup
•   AX application settings:
     – Run the periodic clean up tasks in each main module under [module name]  Periodic  Clean
       up
     – Entire table cache used for frequently updated tables with more than 1000 rows?
     – Identify memo fields and avoid using them; definitely on transaction tables. Run
       Class/SysApplCheck and choose the option CheckTableMemoAndContainerFields
     – Table InventSumLogTTS grows if MRP is not used; all records with isCommitted=1 can be
       deleted.
     – Credit limit check. If the check is marked for header and lines, this could hurt your
       performance.
     – Review number sequences and verify if all continuous number sequences really need to be of
       type continuous and if pre-allocation can be setup for non continuous number sequences.
     – Database log should only be used in exceptional cases. Check the number of rules in
       Administration  Setup  Database log. Also check the current number of records in table
       SysDataBaseLog.
     – Disable AX Configuration key "Keep update objects" from Administration  Setup  System 
       Configuration and then under Administration.
     – Check how may user groups and companies/domains have been setup, how many RLS rules
       have been implemented? See Administration  Setup  Security.
Treat the cause, not the symptoms!
• Performance tuning rules:
  – a) everything relates to queries
  – b) tune the source (queries), not the symptoms
    (hardware)
• 90% of perf tuning is in identifying root causes
  • Once causes identified, resolution is generally relatively
    easy
Treat the cause, not the symptoms!
• Don’t lose time measuring the consequences,
  get straight down to business with the queries
  (the source).
• First, identify inefficient queries
• Then, tune queries identified
Identified issue: Analyze the process(es)
• Procedure:
   – Turn on tracing both on AX client and server side
   – Reproduce the issue
   – Analyze traces with Trace Parser Tool
• Other tools:
   – SQL Server Profiler
   – AX Code Profiler (AX client, ToolsDevelopment toolsCode profiler)
   – AX SQL Statement log (AX client, ToolsOptions… and then SQL tab page)
   – SQL Server DMV’s, Standard reports (from SQL Server Management
     Studio)
   – SQL Server Performance Dashboard reports
     http://www.microsoft.com/downloads/details.aspx?FamilyId=1
     d3a4a0d-7e0c-4730-8204e419218c1efc&displaylang=en
Identified issue: Analyze the process(es)
• Trace Parser Tool:
   – https://mbs.microsoft.com/customersource/downloads/se
     rvicepacks/ax_traceparser.htm?printpage=false&stext=trac
     e parser
• Instruction video’s (currently offline):
   – TraceParser Video Training Part I: Installation:
     http://blogs.msdn.com/axperf/archive/2008/07/18/tracep
     arser-videotraining-part-i-installation.aspx
   – TraceParser Video Training Part II: Configuration, Collection
     and Importing:
     http://blogs.msdn.com/axperf/archive/2008/07/30/tracep
     arser-videotraining-part-ii-configuration-collection-and-
     importing.aspx
AX Trace Parser
• The Microsoft Dynamics AX Trace Parser is a
  user interface and data analyzer added to
  Microsoft Dynamics AX 2009 and built on top
  of Microsoft SQL Server 2005 and the Event
  Tracing for Windows (ETW) framework.
• The ETW framework allows an administrator
  to conduct tracing with system overhead of
  approximately 4%.
AX Trace Parser
• The Trace Parser enables:
  – Rapid analysis of traces to find the longest running
    code
  – Longest running SQL query
  – Highest call count, and other metrics useful in
    debugging a performance problem.
  – A call tree of the code that was executed, allowing the
    developer to gain insight quickly into unfamiliar code.
  – Jumping from the search feature to the call tree, so
    that the person analyzing the trace can determine
    how the problematic code was called.
AX Trace Parser
AX Trace Parser
• Mandatory settings:
  – Allow client tracing on Application Object Server
    instance
  – .Net Framework 3.5 SP1
  – Free disk space
     • AOS trace files AOS computer Log<servername>_<timestamp>.trc
     • Client computer log<Username>_<ClientIP>_<sessionID>_<client>.trc
AX Trace Parser
Tracing option                   Description                            Location
RPC round trips to server        Trace all remote procedure call        Client, Server
                                 (RPC) round trips from any client to
                                 the server.
X++ method calls Trace all       X++ methods that are invoked on        Client, Server
                                 the server.
Number of nested calls:          Limit tracing to the specified         Client, Server
                                 number of nested method calls.
Function calls                   Trace all function calls that are      Client, Server
                                 invoked on the server.
SQL statements                   Trace all SQL Server statements        Client, Server
                                 that are invoked on the server.
Bind variables                   Trace all columns that are used as     Client, Server
                                 input bind variables.
Row fetch                        Trace all rows that are fetched        Client, Server
                                 using SQL Server.
Row fetch summary (count and     Count all rows that are fetched,       Client, Server
time)                            and record the time spent fetching.
Connect and disconnect           Trace each time the AOS connects       Client, Server
                                 and disconnects from the
AX Trace Parser
• Please make sure
  – AOS service account needs admin rights
  – Be sure .net Framework 3.5 SP1 is installed.
     • Error: System.MissingMethodException on the callstack
       WaitHandle.WaitOne()
  – Installing AX integration will integrate with all AOS’s
    on your server (no axc file stuff)
  – tracemaxfilesize should be set to a value less than
    available disk space. By default it is 10000 for 10GB.
  – AX client should be started under UAC Administrator
    when on Vista or higher
AX Trace Parser
DEMO: AX Trace Parser
Performance Analyzer for Dynamics
• Collects data from several Data Management
  Views (DMVs).
• Performance Analyzer for Dynamics enables:
  – Investigate Blocking
  – Investigate SQL statements
  – Investigate Indexes
  – Investigate SQL Server configurations
• http://Code.msdn.com/dynamicsperf Downlo
  adable link
Performance Analyzer for Dynamics

 DEMO: Performance Analyzer for
            Dynamics
Tuning Strategy
• Don’t lose time measuring the consequences,
  get straight down to business with the queries
  (the source).
• First, identify inefficient queries
  - Use Performance Analyzer to monitor queries:
     -   For example, find out the top ten most expensive SQL statements
• Then, tune queries identified
  - Are queries properly indexed
     - Not only SELECTS, UPD, DEL and INS as well
  - Are queries poorly written?
Tuning Strategy
• Dynamics AX kernel generated the SQL
  statement
• Tweak the X++ SQL Statement and AOT
  Queries
• Use SQL Server Profiler to monitor the
  generated SQL statement
Solid State Drives (SSDs)
• SSDs are similar in nature to RAM.
   – No physically moving parts
   – Concurrent access
   – Extremely high speed

• SSDs are ideal for tempdb, given tembdb’s disk oriented
  workload

• SSDs have lower mean time between failures than HDDs
   • no moving parts to wear down
   • HDDs involve physically moving metal at high speed
Solid State Drives (SSDs)
• Even if SSD fails, having tempdb on it creates no risk
   • tempdb persists no transactional data
   • tempdb is totally rebuilt upon every reboot of SQL Server
   • even if device totally fails, tempdb can be relocated on HDD during
     restart of SQL Server



• Testing / Live results
   • Customer testing & live deployment of SDD on tempdb alone
     confirms significant improvement in system performance
      • large-scale financial services online system
      • 19,000% reduction in IO stalls in batch processing
Solid State Drives (SSDs)
• Move tables (and associated indexes) that are
  accessed (created, updated, read) with high
  frequency to Solid State Hard Drives.
  – Reason: Tables that are accessed with high
    frequency have the potential to become a
    bottleneck in an application.
OAD Performance Services
• Performance Review
  – Help you understand the root cause for
    performance bottleneck
  – Provide steps for suggested resolutions.
  – Delivered remotely or onsite

  Contact OutsourceAX Development support for
    more information about the performance service.
    support@outsourceax.com
Thanks you!
                   Questions?
If you have follow up questions, please feel free
   to send me an email.

Martin.zhen@outsourceax.com

More Related Content

What's hot

How does Quest Software fit into a Microsoft hybrid environment?
How does Quest Software fit into a Microsoft hybrid environment?How does Quest Software fit into a Microsoft hybrid environment?
How does Quest Software fit into a Microsoft hybrid environment?Xylos
 
Azure data factory
Azure data factoryAzure data factory
Azure data factoryDavid Giard
 
Diving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction LogDiving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction LogDatabricks
 
SAP ABAP Practice exam
SAP ABAP Practice examSAP ABAP Practice exam
SAP ABAP Practice examIT LearnMore
 
Keeping Identity Graphs In Sync With Apache Spark
Keeping Identity Graphs In Sync With Apache SparkKeeping Identity Graphs In Sync With Apache Spark
Keeping Identity Graphs In Sync With Apache SparkDatabricks
 
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)Faysal Shaarani (MBA)
 
FDMEE Can Do That?
FDMEE Can Do That?FDMEE Can Do That?
FDMEE Can Do That?Alithya
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modificationsscribid.download
 
Introduction to azure cosmos db
Introduction to azure cosmos dbIntroduction to azure cosmos db
Introduction to azure cosmos dbRatan Parai
 
Normalization in SQL | Edureka
Normalization in SQL | EdurekaNormalization in SQL | Edureka
Normalization in SQL | EdurekaEdureka!
 
How to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwHow to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwLuc Vanrobays
 
Oracle Integration Cloud Service (ICS) best practices learned from the field
Oracle Integration Cloud Service (ICS) best practices learned from the fieldOracle Integration Cloud Service (ICS) best practices learned from the field
Oracle Integration Cloud Service (ICS) best practices learned from the fieldRobert van Mölken
 
Beginner's Guide: Programming with ABAP on HANA
Beginner's Guide: Programming with ABAP on HANABeginner's Guide: Programming with ABAP on HANA
Beginner's Guide: Programming with ABAP on HANAAshish Saxena
 
Building a Data Lake on AWS
Building a Data Lake on AWSBuilding a Data Lake on AWS
Building a Data Lake on AWSGary Stafford
 
Discover AI with Microsoft Azure
Discover AI with Microsoft AzureDiscover AI with Microsoft Azure
Discover AI with Microsoft AzureJürgen Ambrosi
 
Why your Spark job is failing
Why your Spark job is failingWhy your Spark job is failing
Why your Spark job is failingSandy Ryza
 

What's hot (20)

How does Quest Software fit into a Microsoft hybrid environment?
How does Quest Software fit into a Microsoft hybrid environment?How does Quest Software fit into a Microsoft hybrid environment?
How does Quest Software fit into a Microsoft hybrid environment?
 
Azure data factory
Azure data factoryAzure data factory
Azure data factory
 
Diving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction LogDiving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction Log
 
SAP ABAP Practice exam
SAP ABAP Practice examSAP ABAP Practice exam
SAP ABAP Practice exam
 
Keeping Identity Graphs In Sync With Apache Spark
Keeping Identity Graphs In Sync With Apache SparkKeeping Identity Graphs In Sync With Apache Spark
Keeping Identity Graphs In Sync With Apache Spark
 
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)
 
FDMEE Can Do That?
FDMEE Can Do That?FDMEE Can Do That?
FDMEE Can Do That?
 
Dynamic binding
Dynamic bindingDynamic binding
Dynamic binding
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 
Introduction to azure cosmos db
Introduction to azure cosmos dbIntroduction to azure cosmos db
Introduction to azure cosmos db
 
Abap Objects for BW
Abap Objects for BWAbap Objects for BW
Abap Objects for BW
 
Normalization in SQL | Edureka
Normalization in SQL | EdurekaNormalization in SQL | Edureka
Normalization in SQL | Edureka
 
How to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwHow to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bw
 
Oracle Integration Cloud Service (ICS) best practices learned from the field
Oracle Integration Cloud Service (ICS) best practices learned from the fieldOracle Integration Cloud Service (ICS) best practices learned from the field
Oracle Integration Cloud Service (ICS) best practices learned from the field
 
Beginner's Guide: Programming with ABAP on HANA
Beginner's Guide: Programming with ABAP on HANABeginner's Guide: Programming with ABAP on HANA
Beginner's Guide: Programming with ABAP on HANA
 
sap script overview
sap script overviewsap script overview
sap script overview
 
Architecting a datalake
Architecting a datalakeArchitecting a datalake
Architecting a datalake
 
Building a Data Lake on AWS
Building a Data Lake on AWSBuilding a Data Lake on AWS
Building a Data Lake on AWS
 
Discover AI with Microsoft Azure
Discover AI with Microsoft AzureDiscover AI with Microsoft Azure
Discover AI with Microsoft Azure
 
Why your Spark job is failing
Why your Spark job is failingWhy your Spark job is failing
Why your Spark job is failing
 

Viewers also liked

Maximize Dynamics AX System Performance with a Health Check
Maximize Dynamics AX System Performance with a Health CheckMaximize Dynamics AX System Performance with a Health Check
Maximize Dynamics AX System Performance with a Health CheckStoneridge Software
 
AX2012 Technical Track - Infrastructure, Davy Vliegen
AX2012 Technical Track - Infrastructure, Davy VliegenAX2012 Technical Track - Infrastructure, Davy Vliegen
AX2012 Technical Track - Infrastructure, Davy Vliegendynamicscom
 
Производство в Microsoft Dynamics AX 2012
Производство в Microsoft Dynamics AX 2012Производство в Microsoft Dynamics AX 2012
Производство в Microsoft Dynamics AX 2012Vadim Korepin
 
SQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type ExplainedSQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type ExplainedConfio Software
 
Microsoft Dynamics AX 2012 - X++ Compiled to CIL
Microsoft Dynamics AX 2012 - X++ Compiled to CILMicrosoft Dynamics AX 2012 - X++ Compiled to CIL
Microsoft Dynamics AX 2012 - X++ Compiled to CILFabio Filardi
 
Ax 2012 x++ code best practices
Ax 2012 x++ code best practicesAx 2012 x++ code best practices
Ax 2012 x++ code best practicesSaboor Ahmed
 
Optimizing MS Dynamics AX 2012 R3
Optimizing MS Dynamics AX 2012 R3Optimizing MS Dynamics AX 2012 R3
Optimizing MS Dynamics AX 2012 R3Juan Fabian
 
To Swift 2...and Beyond!
To Swift 2...and Beyond!To Swift 2...and Beyond!
To Swift 2...and Beyond!Scott Gardner
 

Viewers also liked (8)

Maximize Dynamics AX System Performance with a Health Check
Maximize Dynamics AX System Performance with a Health CheckMaximize Dynamics AX System Performance with a Health Check
Maximize Dynamics AX System Performance with a Health Check
 
AX2012 Technical Track - Infrastructure, Davy Vliegen
AX2012 Technical Track - Infrastructure, Davy VliegenAX2012 Technical Track - Infrastructure, Davy Vliegen
AX2012 Technical Track - Infrastructure, Davy Vliegen
 
Производство в Microsoft Dynamics AX 2012
Производство в Microsoft Dynamics AX 2012Производство в Microsoft Dynamics AX 2012
Производство в Microsoft Dynamics AX 2012
 
SQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type ExplainedSQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type Explained
 
Microsoft Dynamics AX 2012 - X++ Compiled to CIL
Microsoft Dynamics AX 2012 - X++ Compiled to CILMicrosoft Dynamics AX 2012 - X++ Compiled to CIL
Microsoft Dynamics AX 2012 - X++ Compiled to CIL
 
Ax 2012 x++ code best practices
Ax 2012 x++ code best practicesAx 2012 x++ code best practices
Ax 2012 x++ code best practices
 
Optimizing MS Dynamics AX 2012 R3
Optimizing MS Dynamics AX 2012 R3Optimizing MS Dynamics AX 2012 R3
Optimizing MS Dynamics AX 2012 R3
 
To Swift 2...and Beyond!
To Swift 2...and Beyond!To Swift 2...and Beyond!
To Swift 2...and Beyond!
 

Similar to Dynamics ax performance tuning

collab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdfcollab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdfElboulmaniMohamed
 
ebs-performance-tuning-part-1-470542.pdf
ebs-performance-tuning-part-1-470542.pdfebs-performance-tuning-part-1-470542.pdf
ebs-performance-tuning-part-1-470542.pdfElboulmaniMohamed
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cRonald Francisco Vargas Quesada
 
Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502kaziul Islam Bulbul
 
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseNoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseParesh Patel
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Aaron Shilo
 
Optimization SQL Server for Dynamics AX 2012 R3
Optimization SQL Server for Dynamics AX 2012 R3Optimization SQL Server for Dynamics AX 2012 R3
Optimization SQL Server for Dynamics AX 2012 R3Juan Fabian
 
שבוע אורקל 2016
שבוע אורקל 2016שבוע אורקל 2016
שבוע אורקל 2016Aaron Shilo
 
Oracle EBS Production Support - Recommendations
Oracle EBS Production Support - RecommendationsOracle EBS Production Support - Recommendations
Oracle EBS Production Support - RecommendationsVigilant Technologies
 
Performance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL DatabasePerformance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL DatabaseTung Nguyen Thanh
 
OOW09 Ebs Tuning Final
OOW09 Ebs Tuning FinalOOW09 Ebs Tuning Final
OOW09 Ebs Tuning Finaljucaab
 
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]vasuballa
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basicsnitin anjankar
 
Troubleshooting SQL Server
Troubleshooting SQL ServerTroubleshooting SQL Server
Troubleshooting SQL ServerStephen Rose
 
SQL Server 2008 Development for Programmers
SQL Server 2008 Development for ProgrammersSQL Server 2008 Development for Programmers
SQL Server 2008 Development for ProgrammersAdam Hutson
 
071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephenSteve Feldman
 
Getting optimal performance from oracle e-business suite presentation
Getting optimal performance from oracle e-business suite presentationGetting optimal performance from oracle e-business suite presentation
Getting optimal performance from oracle e-business suite presentationBerry Clemens
 
Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesRichard Douglas
 
Getting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suiteGetting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suiteaioughydchapter
 
Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)pasalapudi123
 

Similar to Dynamics ax performance tuning (20)

collab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdfcollab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdf
 
ebs-performance-tuning-part-1-470542.pdf
ebs-performance-tuning-part-1-470542.pdfebs-performance-tuning-part-1-470542.pdf
ebs-performance-tuning-part-1-470542.pdf
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12c
 
Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502
 
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseNoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 
Optimization SQL Server for Dynamics AX 2012 R3
Optimization SQL Server for Dynamics AX 2012 R3Optimization SQL Server for Dynamics AX 2012 R3
Optimization SQL Server for Dynamics AX 2012 R3
 
שבוע אורקל 2016
שבוע אורקל 2016שבוע אורקל 2016
שבוע אורקל 2016
 
Oracle EBS Production Support - Recommendations
Oracle EBS Production Support - RecommendationsOracle EBS Production Support - Recommendations
Oracle EBS Production Support - Recommendations
 
Performance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL DatabasePerformance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL Database
 
OOW09 Ebs Tuning Final
OOW09 Ebs Tuning FinalOOW09 Ebs Tuning Final
OOW09 Ebs Tuning Final
 
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
Troubleshooting SQL Server
Troubleshooting SQL ServerTroubleshooting SQL Server
Troubleshooting SQL Server
 
SQL Server 2008 Development for Programmers
SQL Server 2008 Development for ProgrammersSQL Server 2008 Development for Programmers
SQL Server 2008 Development for Programmers
 
071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen
 
Getting optimal performance from oracle e-business suite presentation
Getting optimal performance from oracle e-business suite presentationGetting optimal performance from oracle e-business suite presentation
Getting optimal performance from oracle e-business suite presentation
 
Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock Holmes
 
Getting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suiteGetting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suite
 
Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)
 

Recently uploaded

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 

Recently uploaded (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 

Dynamics ax performance tuning

  • 1. Dynamics AX Performance Tuning Martin Zhen Principle technical consultant @ OutsourceAX Development Martin.zhen@outsourceax.com
  • 2. About OutsourceAX Development OutsourceAX Development is an offshore Dynamics AX Development provider, providing Dynamics AX development/support services to Microsoft Dynamics Partners and Customers.
  • 3. Agenda Performance Tuning System monitoring/tooling for SQL Problem solving strategy Dynamics AX Trace Parser Tool Performance Analyzer for Microsoft Dynamics Tuning Strategy Solid State Drives
  • 4. System monitoring/tooling for SQL • SQL Server Profiler • System monitoring / Perfmon / PAL tool • Activity Monitor (SQL Server Management Studio) • Event logs, SQL logs • Dynamic Management Views (DMVs) / standard reports • SQL trace (sp_trace TSQL) • System Stored Procedures (sp_who, sp_lock…) • DBCC statements • Built-in functions (@@CPU_BUSY, @@CONNECTIONS…) • Trace Flags • Database Engine Tuning Advisors http://msdn.microsoft.com/en-us/library/ms179428.aspx
  • 5. Evaluating SQL Server Performance http://msdn.microsoft.com/en-us/library/ms179428.aspx
  • 6. Evaluating AX SQL Performance • First question to ask -- Identified issue o Clear repro on standard/partner/customer environment -- Unidentified issue o No idea when it happens and/or what functional process(es) is/are slow • Second question to ask -- What are the expectations? What is an acceptable performance? -- For critical processes; what is the maximum time window? -- Clear goal to work towards
  • 7. Define the tuning strategy Tuning strategy – Identified issue – Unidentified issue
  • 8. Identified issue • Reproducible only in customer's environment – Check hardware – Check software, settings and setup – Analyze the process (Trace Parser, Profiler…) • Reproducible in any environment (with or without specific dataset) – Analyze the process (Trace Parser, Profiler…)
  • 9. Unidentified issue • Check hardware • Check software, settings and setup • Long term data collection (AXPERF, IDM)
  • 10. Check Hardware: Tools • Performance Monitoring (Perfmon) – Under OS Administrative Tools – Reliability and Performance Monitor (Windows Server 2008) • Microsoft Network Monitor (Netmon) – Minimum client-server network requirements • Bandwidth >= 100 mbps • Latency <= 5ms – Minimum server-server network bandwidth is 1 gbps – Netmon v3.2 for Windows Server 2003 and 2008 download • http://www.microsoft.com/downloads/details.aspx?familyid=f4db40af-1e08-4a21- a26b-ec2f4dc4190d&displaylang=en
  • 11. Check Software, Settings and Setup: References • System requirement guides (see previous slides) • For SQL Server: – Latest Service Pack from http://support.microsoft.com – Recent CU Package from http://support.microsoft.com • For Dynamics AX: – Latest Service Pack from https://mbs.microsoft.com/partnersource – Recent Rollup package from PartnerSource or contact Microsoft Support • For SQL Server Settings: – AX Performance team blog: http://blogs.msdn.com/axperf
  • 12. Check Software, Settings and Setup • Disk setup – AX data file(s), transaction log file and Tempdb on dedicated separate LUNs. • AX data file(s): RAID 0+1, or 10 preferred • AX transaction log file: RAID 1, 0+1, or 10 preferred • Tempdb database files: RAID 1, 0+1, or 10 preferred – The TempDB is heavily utilized when the Read Committed Snapshot Isolation (RCSI) is activated, for Sort operations and Intermediate join results. To get an additional performance gain Tempdb should be properly sized and should have as many data files as core CPUs. – Check Disk sector alignment as it can have a serious impact on performance of the system. More information on how to optimize can be found here: • http://support.microsoft.com/kb/929491 • http://blogs.msdn.com/jimmymay/archive/2008/10/14/disk- partitionalignment-for-sql-server-slide-deck.aspx
  • 13. Check Software, Settings and Setup • SQL Server Settings – AX Maximum server memory set correctly. As a guideline: available server RAM - 2GB (for OS) – Processor affinity set to 0 (use all CPU cores), Boost SQL Server priority setting disabled. – Max Degree of Parallelism (Maxdop) set to 1. The reason for this is that when you have more than 1 here during business hours activity SQL-Server uses more than one processor for calculating one statement. If this is a long running statement it gets split by the number you set by this value and every processor has to wait till the other ones have completed. – Same collation settings for Tempdb (system DBs) and AX DB which normally matches the Server Collation setting default. – Named pipes protocol disabled if not used. Can be disabled via SQL Server Configuration Manager (SQL Server Network Configuration).
  • 14. Check Software, Settings and Setup • Database Settings – Read Committed Snapshot Isolation (RCSI) set to on. This isolation level allows greater concurrency between read and update transactions. The effect of this isolation level is that a read operation does not block (and cannot be blocked by) concurrent update operations. • http://technet.microsoft.com/en-us/library/ms175095.aspx includes complete instruction on enabling RCSI • http://technet.microsoft.com/en-us/library/ms188277.aspx includes a discussion contrasting Read Committed Snapshot Isolation and Read Committed Isolation. – Verify that compatibility level of AX database is to 90 (SQL 2005) or 100 (SQL 2008). – Auto Create Statistics and Auto Update Statistics set to True. – If Autogrowth is configured, use MB (usually 100-500) rather than percent for both data and log files. – Auto Shrink always set to False.
  • 15. Check Software, Settings and Setup • SQL OS settings – Lock pages in memory set on SQL server for the account that has permission to run the Sqlservr.exe. – This is an important setting as it can reduce paging of buffer pool memory in the 64-bit version of SQL Server 2005. – More info can be found in KB 918483: How to reduce paging of buffer pool memory in the 64-bit version of SQL Server 2005 (http://support.microsoft.com/kb/918483 ) • SQL administration – Check if index defragmentation (rebuild) is done on a regular base. There should be a maintenance job for this task and current state of index fragmentation can for example be verified with DMV sys.dm_db_index_physical_stats. – Check if update statistics is done
  • 16. Check Software, Settings and Setup • SQL Trace Flags for AX – Enable 1224 that changes the default behaviour for lock escalation. – Enable 7646 to help reduce contention on the internal full text table. – Enable 4136 to address the parameter sniffing issue. – Enable 4199 to allow the AX kernel that benefit from a more efficient execution plan when 4199 is enabled. http://blogs.msdn.com/b/axinthefield/archive/2010/11/ 04/sql-server-trace-flags-for-dynamics-ax.aspx
  • 17. Check Software, Settings and Setup • AOS settings – Maximum open cursors parameter should not be changed from default value of 90. – Maximum buffer size should not be changed from default value of 24Kb. – Allow INDEX hints in queries setting should be disabled. – Disable setting “Enable breakpoints to debug X++ code running on this server“. – Use literals should be off by default, use only in specific cases to avoid for example parameter sniffing. – Array fetch ahead parameter should not be changed from default value without a valid reason. – No tracing should be activated in production system. See Microsoft Dynamics AX Server Configuration Utility, Tracing tab page AND Microsoft Dynamics AX Configuration Utility (on AX client side), Tracing tab page.
  • 18. Check Software, Settings and Setup • AX application settings: – Run the periodic clean up tasks in each main module under [module name] Periodic Clean up – Entire table cache used for frequently updated tables with more than 1000 rows? – Identify memo fields and avoid using them; definitely on transaction tables. Run Class/SysApplCheck and choose the option CheckTableMemoAndContainerFields – Table InventSumLogTTS grows if MRP is not used; all records with isCommitted=1 can be deleted. – Credit limit check. If the check is marked for header and lines, this could hurt your performance. – Review number sequences and verify if all continuous number sequences really need to be of type continuous and if pre-allocation can be setup for non continuous number sequences. – Database log should only be used in exceptional cases. Check the number of rules in Administration Setup Database log. Also check the current number of records in table SysDataBaseLog. – Disable AX Configuration key "Keep update objects" from Administration Setup System Configuration and then under Administration. – Check how may user groups and companies/domains have been setup, how many RLS rules have been implemented? See Administration Setup Security.
  • 19. Treat the cause, not the symptoms! • Performance tuning rules: – a) everything relates to queries – b) tune the source (queries), not the symptoms (hardware) • 90% of perf tuning is in identifying root causes • Once causes identified, resolution is generally relatively easy
  • 20. Treat the cause, not the symptoms! • Don’t lose time measuring the consequences, get straight down to business with the queries (the source). • First, identify inefficient queries • Then, tune queries identified
  • 21. Identified issue: Analyze the process(es) • Procedure: – Turn on tracing both on AX client and server side – Reproduce the issue – Analyze traces with Trace Parser Tool • Other tools: – SQL Server Profiler – AX Code Profiler (AX client, ToolsDevelopment toolsCode profiler) – AX SQL Statement log (AX client, ToolsOptions… and then SQL tab page) – SQL Server DMV’s, Standard reports (from SQL Server Management Studio) – SQL Server Performance Dashboard reports http://www.microsoft.com/downloads/details.aspx?FamilyId=1 d3a4a0d-7e0c-4730-8204e419218c1efc&displaylang=en
  • 22. Identified issue: Analyze the process(es) • Trace Parser Tool: – https://mbs.microsoft.com/customersource/downloads/se rvicepacks/ax_traceparser.htm?printpage=false&stext=trac e parser • Instruction video’s (currently offline): – TraceParser Video Training Part I: Installation: http://blogs.msdn.com/axperf/archive/2008/07/18/tracep arser-videotraining-part-i-installation.aspx – TraceParser Video Training Part II: Configuration, Collection and Importing: http://blogs.msdn.com/axperf/archive/2008/07/30/tracep arser-videotraining-part-ii-configuration-collection-and- importing.aspx
  • 23. AX Trace Parser • The Microsoft Dynamics AX Trace Parser is a user interface and data analyzer added to Microsoft Dynamics AX 2009 and built on top of Microsoft SQL Server 2005 and the Event Tracing for Windows (ETW) framework. • The ETW framework allows an administrator to conduct tracing with system overhead of approximately 4%.
  • 24. AX Trace Parser • The Trace Parser enables: – Rapid analysis of traces to find the longest running code – Longest running SQL query – Highest call count, and other metrics useful in debugging a performance problem. – A call tree of the code that was executed, allowing the developer to gain insight quickly into unfamiliar code. – Jumping from the search feature to the call tree, so that the person analyzing the trace can determine how the problematic code was called.
  • 26. AX Trace Parser • Mandatory settings: – Allow client tracing on Application Object Server instance – .Net Framework 3.5 SP1 – Free disk space • AOS trace files AOS computer Log<servername>_<timestamp>.trc • Client computer log<Username>_<ClientIP>_<sessionID>_<client>.trc
  • 27. AX Trace Parser Tracing option Description Location RPC round trips to server Trace all remote procedure call Client, Server (RPC) round trips from any client to the server. X++ method calls Trace all X++ methods that are invoked on Client, Server the server. Number of nested calls: Limit tracing to the specified Client, Server number of nested method calls. Function calls Trace all function calls that are Client, Server invoked on the server. SQL statements Trace all SQL Server statements Client, Server that are invoked on the server. Bind variables Trace all columns that are used as Client, Server input bind variables. Row fetch Trace all rows that are fetched Client, Server using SQL Server. Row fetch summary (count and Count all rows that are fetched, Client, Server time) and record the time spent fetching. Connect and disconnect Trace each time the AOS connects Client, Server and disconnects from the
  • 28. AX Trace Parser • Please make sure – AOS service account needs admin rights – Be sure .net Framework 3.5 SP1 is installed. • Error: System.MissingMethodException on the callstack WaitHandle.WaitOne() – Installing AX integration will integrate with all AOS’s on your server (no axc file stuff) – tracemaxfilesize should be set to a value less than available disk space. By default it is 10000 for 10GB. – AX client should be started under UAC Administrator when on Vista or higher
  • 29. AX Trace Parser DEMO: AX Trace Parser
  • 30. Performance Analyzer for Dynamics • Collects data from several Data Management Views (DMVs). • Performance Analyzer for Dynamics enables: – Investigate Blocking – Investigate SQL statements – Investigate Indexes – Investigate SQL Server configurations • http://Code.msdn.com/dynamicsperf Downlo adable link
  • 31. Performance Analyzer for Dynamics DEMO: Performance Analyzer for Dynamics
  • 32. Tuning Strategy • Don’t lose time measuring the consequences, get straight down to business with the queries (the source). • First, identify inefficient queries - Use Performance Analyzer to monitor queries: - For example, find out the top ten most expensive SQL statements • Then, tune queries identified - Are queries properly indexed - Not only SELECTS, UPD, DEL and INS as well - Are queries poorly written?
  • 33. Tuning Strategy • Dynamics AX kernel generated the SQL statement • Tweak the X++ SQL Statement and AOT Queries • Use SQL Server Profiler to monitor the generated SQL statement
  • 34. Solid State Drives (SSDs) • SSDs are similar in nature to RAM. – No physically moving parts – Concurrent access – Extremely high speed • SSDs are ideal for tempdb, given tembdb’s disk oriented workload • SSDs have lower mean time between failures than HDDs • no moving parts to wear down • HDDs involve physically moving metal at high speed
  • 35. Solid State Drives (SSDs) • Even if SSD fails, having tempdb on it creates no risk • tempdb persists no transactional data • tempdb is totally rebuilt upon every reboot of SQL Server • even if device totally fails, tempdb can be relocated on HDD during restart of SQL Server • Testing / Live results • Customer testing & live deployment of SDD on tempdb alone confirms significant improvement in system performance • large-scale financial services online system • 19,000% reduction in IO stalls in batch processing
  • 36. Solid State Drives (SSDs) • Move tables (and associated indexes) that are accessed (created, updated, read) with high frequency to Solid State Hard Drives. – Reason: Tables that are accessed with high frequency have the potential to become a bottleneck in an application.
  • 37. OAD Performance Services • Performance Review – Help you understand the root cause for performance bottleneck – Provide steps for suggested resolutions. – Delivered remotely or onsite Contact OutsourceAX Development support for more information about the performance service. support@outsourceax.com
  • 38. Thanks you! Questions? If you have follow up questions, please feel free to send me an email. Martin.zhen@outsourceax.com