Plan for performance optimization and testing [AX 2012]

This topic provides an overview of performance optimization and testing for Microsoft Dynamics AX. The topic also describes the testing that we recommend that you perform both before and after go-live.

Identify all your core scenarios. Many times, you can find 5 to 10 processes that are essential for your business. If you find other processes that are essential, such as reports, add them to the list for performance testing.

Examples of core scenarios might include the creation and processing of sales orders, production orders, and transfer orders.

Define how to test your scenarios. There are three primary methods for testing performance before go-live:

Tracing – You can use either Trace Parser or the Microsoft Visual Studio Profiling Tools to get an overview of the performance of your processes. You must use the Visual Studio Profiling Tools if X++ code traverses into Microsoft Compiled Intermediate Language (CIL). For example, you must use the Visual Studio Profiling Tools if you use the RunAs() command, run a batch process, or work with services. By repeatedly tracing your core processes, you can find up to 90 percent of all performance issues in your pre-production system.

User acceptance tests – Projects usually have multiple user acceptance tests. During these tests, you can use DynamicsPerf to find bottlenecks. You can also monitor the system by using Performance Monitor. Interviews with users can also help you find bottlenecks.

The following list describes some of the goals of performance testing and monitoring after go-live:

During the first few weeks after you go into production, monitor performance closely to ensure that everything runs as you expect.

As time passes, and the amount of data increases, monitor performance to ensure that everything continues to run as you expect. Larger amounts of data may cause Microsoft SQL Server to use different execution plans. Additionally, code that previously had fast performance, such as while loops, may become slower, because the code must iterate through more data.

Both before and after go-live, performance tuning is an iterative process. For example, if you identify a slow process at any point, you can trace and optimize the process by using either the Visual Studio Profiling Tools or Trace Parser.

The following list describes some of the maintenance activities that we recommend that you perform regularly in your production environment:

Defragment indexes – You can defragment indexes from either SQL Server Management Studio or the Intelligent Data Management Framework (IDMF).

Update SQL Server statistics from SQL Server Management Studio – We recommend that you run both manual and automatic updates of statistics. Manual updates may become more important as the size of your database increases, because automatic updates are less likely to be completed on large data sets.

Reduce the size of the database – You can use IDMF to keep the size of the production database small. A small database makes database operations more efficient. For example, you can delete or archive data that is not required in your production system.

Good performance requires good and continuous monitoring. If you find problematic processes early, you can optimize them without significantly affecting your end users. Remember that performance tuning is an iterative process. Often, you must complete more than one round of tuning to achieve the maximum improvement in performance.