Optimizing MS Dynamics AX 2012 R3

28
Optimizing your Microsoft Dynamics AX Juan Rafael MVP|MCT AX [email protected] @jlc_rve

Transcript of Optimizing MS Dynamics AX 2012 R3

Page 1: Optimizing MS Dynamics AX 2012 R3

Optimizing your Microsoft Dynamics AX

Juan RafaelMVP|MCT [email protected]@jlc_rve

Page 2: Optimizing MS Dynamics AX 2012 R3

Value of Lifecycle Services for Key PersonasBusiness

Analyst IT AdminDeveloper

• Data-driven and predictable implementations

• Proactive monitoring of the system

• Reduce time to develop high-quality customizations

Project Manager

• Repeatable and predictable project experience and success

Page 3: Optimizing MS Dynamics AX 2012 R3

Microsoft Dynamics AX Architectural Review

Page 4: Optimizing MS Dynamics AX 2012 R3

Microsoft Dynamics AX Architectural Review• Three-Tier Architecture

Data

• Microsoft Dynamics AX database, the model store, the Reporting Services database, the Analysis Services database, and the Enterprise Portal database.

Application

• Application Object Server (AOS), Enterprise Portal, Reporting and Analytics, Workflow, Services and Application Integration Framework, and Help Server

Presentation

• Microsoft Dynamics AX Rich Client and Enterprise Portal

Page 5: Optimizing MS Dynamics AX 2012 R3

Microsoft Dynamics AX Architectural Review• Reporting Architecture

End user workstation

Microsoft Dynamics AX ClientMenu item

Parameters form

Report viewer

Report server

SSRS instance

Report (.rdl file)

Data extension

Customization extension

Microsoft Dynamics AX server

Services

Metadata

service

Query web service

AOT

Query

1 2

3

45

Page 6: Optimizing MS Dynamics AX 2012 R3

Microsoft Dynamics AX Architectural Review• Enterprise Portal Architecture

Page 7: Optimizing MS Dynamics AX 2012 R3

Sizing Questions• What is the Maximum Transaction Volume expected in an Hour,

during Peak Season?• What is the Record Count for Master Data?• Which modules will be used in the Microsoft Dynamics AX

application?• Will any Add-on to Microsoft Dynamics AX be used?• Will Microsoft Dynamics AX have to integrate to third-party

systems?• Are there any major customizations that must be created?• How many users will access the Microsoft Dynamics AX system?

Page 8: Optimizing MS Dynamics AX 2012 R3

Database Sizing Guidelines• CPU – The database server should have one core for every

4,000 to 12,000 transactions entered for every hour, with a minimum of four cores. For example, an organization that enters 48,000 transactions for each hour during peak hours should have 4 to 12 cores.

• Memory – For every core on the database server, 2 to 4 gigabytes (GB) of memory should be allocated. For example, a database server that has 8 cores should have 16 to 32 GB of memory.

• Storage – Data, transaction logs, and tempdb should be stored in a raid 0+1 array. The data drive must be large enough to hold the production database, and have the disk throughput to handle Microsoft Dynamics AX transaction volumes.

Page 9: Optimizing MS Dynamics AX 2012 R3

Application Object Server Sizing Guidelines

• CPU – Each AOS should have one core for every 8,000 to 12,000 transactions entered for every hour. Additionally, one core should exist for every 25 to 100 concurrent users who access the Microsoft Dynamics AX 2012 system.

• Memory – 4 GB to 8 GB of memory should be allocated to each AOS instance.

• Batch Server – AOS servers designated to run batch jobs should have one to four threads allocated for each CPU core.

Page 10: Optimizing MS Dynamics AX 2012 R3

Enterprise Portal Server Sizing Guidelines

• CPU – The Enterprise Portal web server should have 2 to 16 cores, depending on the user count and the transaction volume/complexity. Generally, one core for every 40 to 120 concurrent users should be added.

• Memory – 1/2 GB to 2 GB of memory should be allocated for every core.

• Network – Enterprise Portal web servers should be equipped with Gigabit Ethernet Network Interface Cards and exist on a Gigabit network.

Page 11: Optimizing MS Dynamics AX 2012 R3

Terminal Server Sizing Guidelines• CPU – A minimum of two cores should be allocated for

the base Terminal Server.• Memory – A minimum of 4 GB of memory should be

installed in the base Terminal Server. In addition, 100 Megabytes (MB) to 200 MB of memory should be allocated for every client connection.

• Network – If latency on the Local Area Network is over 50 milliseconds or access to the Microsoft Dynamics AX Rich Client is required over a Wide Area Network, Remote Desktop Services should be used.

Page 12: Optimizing MS Dynamics AX 2012 R3

SQL Configuration• Scenario:

Simon, the Systems Implementer, is helping Contoso to configure its SQL Server to make sure that the SQL Server continues to run without interruptions on AX.

• Configure the Operating System BIOSDisable Hyper-Threading and power saving features.

• Operating System SettingsSelect a high performance power plan, and set processor scheduling prioritized for background services.

Page 13: Optimizing MS Dynamics AX 2012 R3

SQL Configuration• SQL Server Service Account Configuration

• Lock pages in memory • Perform Volume Maintenance Tasks

Page 14: Optimizing MS Dynamics AX 2012 R3

SQL Configuration• Configuration of the Instance of the SQL

Server• Max Degree of Parallelism• Maximum server memory• Minimum server memory• Default index fill factor

Page 15: Optimizing MS Dynamics AX 2012 R3

SQL Configuration• Trace Flags

1224 - Disables lock escalation based on the number of locks.

4136 - Can significantly improve the performance of the Microsoft Dynamics AX implementation if the structure of the Microsoft Dynamics AX data has parameter sniffing issues.

4199 - Activates query optimizer fixes from several hotfixes.

1117 - Keep tempdb data files the same size in case tempdb must autogrow.

2371 - Changes the threshold to automatically update the statistics for the indexes on a table from 20 percent to a formula that is based on both the percent change and the number of rows in the table.

Page 16: Optimizing MS Dynamics AX 2012 R3

SQL Configuration• Configure tempdb

• Move tempdb, log files, and data files to separate high performance disks

• Set the tempdb to 20 percent of the size of the database• Create one tempdb data file for each processor core• Configure Autogrow to between 250 and 500 MB for each file

Page 17: Optimizing MS Dynamics AX 2012 R3

SQL Configuration• Configure the AX Database

Property Recommended setting

READ_COMMITTED_SNAPSHOT ONAUTO_CREATE_STATISTICS ONAUTO_UPDATE_STATISTICS ONAUTO_UPDATE_STATISTICS_ASYNC OFFAUTO_SHRINK OFFAUTO_CLOSE OFF

• Physical Storage Configuration

ALTER DATABASE <ax database name>SET READ_COMMITTED_SNAPSHOT ONGO

Page 18: Optimizing MS Dynamics AX 2012 R3

Microsoft Dynamics AX Settings• Microsoft Dynamics AX Server Configuration

Enable breakpoints to debug X++ code running on this server Enable clients to trace their interactions with the AOS instance.

Enable global breakpoints Enable the debugging X++ code that is invoked by using Query Services.

Page 19: Optimizing MS Dynamics AX 2012 R3

Microsoft Dynamics AX Settings• Microsoft Dynamics AX Server Configuration

Page 20: Optimizing MS Dynamics AX 2012 R3

Microsoft Dynamics AX Settings• Microsoft Dynamics AX Server Configuration

Statement cache Determines how many statements the AOS caches.

Maximum buffer size (KB) The maximum size of the buffer the kernel allocates for holding input/output data to and from the SQL server.

Page 21: Optimizing MS Dynamics AX 2012 R3

Microsoft Dynamics AX Settings• Microsoft Dynamics AX Server Configuration

Page 22: Optimizing MS Dynamics AX 2012 R3

Microsoft Dynamics AX Settings• Server Configuration

• Error on invalid field access• Error on exceeding maximum number of tables in join• Maximum number of tables in join• Client record cache factor• Entire table cache size• Global Object Cache elements• Record cache elements for <Table group> table group

Page 23: Optimizing MS Dynamics AX 2012 R3

Microsoft Dynamics AX Settings

• AOS Load Balancing• Data Cleanup• Client Performance Options• Additional areas affecting performance

• Database log• Number sequences • Credit limit check • Complex Company structure • In Virtual company setup and views

Page 24: Optimizing MS Dynamics AX 2012 R3

Batch Configuration• Batch Configuration

• Maximum batch threads • Batch server groups

Page 25: Optimizing MS Dynamics AX 2012 R3

Design Effective SQL Server Maintanence Plans

Maintenance plans

Index fragmentati

onStatistics Maintenanc

e Frequency

Page 26: Optimizing MS Dynamics AX 2012 R3

DEMO

Page 27: Optimizing MS Dynamics AX 2012 R3

Q&A

Page 28: Optimizing MS Dynamics AX 2012 R3

© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.