Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dynamics AX: Performance that Exceeds Expectations

Similar presentations


Presentation on theme: "Dynamics AX: Performance that Exceeds Expectations"— Presentation transcript:

1

2 Dynamics AX: Performance that Exceeds Expectations
Anna Kupchenko| Celenia Software

3 Introduction Celenia Anna Kupchenko, PMP For more info www.celenia.com
Division Manager, Senior Solution Architect at Celenia Software,

4 Agenda Introduction Addressing performance Planning for performance
Problem identification Troubleshooting: conceptual approach Recommended tools Planning for performance Implementation examples Case Studies: Issues Troubleshooting techniques Results Summary

5 Problem Identification
How do you know that performance is poor? Slow response time Batch jobs long in duration Users are not able to complete their daily tasks Small documents take too long to process Response time is slow for a particular user / machine / operation AX is ‘slow’ compared to the old system

6 Problem Identification
When did the problem start? From the very beginning of system go-live When trying to process lots of data After N+ users started simultaneously working in AX After installing update xxxxx.yyy.

7 Problem Identification
What are the performance expectations? Forms response time should be under 5 seconds Invoicing should be completed during the weekend Warehouse receipt should not take longer than…

8 Performance Troubleshooting
Don’t panic! do not replace AX with another ERP system do not roll back to the prior system do not fire your developer Start to analyze, localize and break down the problem Remove bottleneck in the infrastructure or the code Fine tune, fine tune, fine tune  At least 50% of performance cases have a simple & quick solution!

9 Performance Troubleshooting
Infrastructure, network SQL Server Dynamics AX, AOS Advanced troubleshooting

10 Infrastructure Solutions for the majority of users and operations:
Check SQL Server and AOS machine status RAM usage, CPU load, IO Operations, disk space Tools: Task Manager, Network Monitor, Visual Studio Profiling Tools SQL Activity monitor: Performance monitor:

11 Infrastructure Check your installation topology
Is the line stable, bandwidth and latency normal between: AOS and SQL Server? SQL Server and data storage? Client and AOS? Are any of the servers shared with other heavily loaded systems? Check event logs for any suspicious events, especially recurring ones Verify software versions, updates, anti-viruses etc. are correct

12 Tools – SQL Server layer
DynamicsPerf (Performance analyzer for Microsoft Dynamics) we love it! SQL Server Profile Trace SQLdiag utility

13 AX: Finding bottlenecks
If you have problems with a particular task, form or report Do a Code review: static analysis Analyze call stack: dynamic analysis Look for Non-code related reasons Complete advanced fine tuning

14 Code review Best practice issues
Redundant, unnecessary or wrongly placed database calls, Select fields list Nested loops instead of joins, using outer join instead of inner-, inner- join instead of exists- Missing or redundant index Create / update / delete records one by one instead of bulk operations Aggregate functions misused

15 Code review Clustered index not used
Selecting records that are not used (use firstonly, firstfast) Check if special select keywords are used (forcePlaceholders | forceLiterals] | forceselectorder |forceNestedLoop | repeatableRead | index hint) Update without updates Assigning fields with new values that are not changed Updating % of records selected for update Table inheritance used on transactional data

16 Code review Wrong field justification
A heavy operation inside loop that can be moved outside User input or external calls inside a transaction Wrongly placed code DB operations on client side a lot of client-server roundtrips Form is overloaded with code can be moved to table or class level or skipped Redundant recursive calls and even endless loops  On-disk temporary tables instead of in-memory

17 Code review Slow data types and formats used
Excel vs CSV Containers vs sets Not optimized number sequences Continuous NS Generate ID yourself if possible Potential deadlocks: update and delete the same table at the same time Numerous selects of the same structure instead of views with calculated columns

18 Tools – AX layer New and hot! Performance Benchmark SDK for Dynamics AX: Trace Parser: Is an optional component on an AX install Code Profiler: Available inside MorphX

19 Traceparser tool. SQL queries

20 Traceparser tool. Top 5

21 Traceparser tool. Callstack

22 Non-code related Solutions
Configuration keys turned “on” that are not used “Hanging” user sessions Slow external components / calls Slow workflows Redundant security checks XDS, RLS

23 Advanced Tuning SQL administration Check SQL Server or database setup
Check SQL queries execution plans – no full scans at least Check Database recovery model SQL table partitioning Split huge tables by key prefix and move to different hard drives for parallel processing Move tables that are frequently jointed to different hard drives DB statistics update

24 Advanced Tuning Large data sets Use batch parallelism
Pre-process data for more of an even load Consolidate data

25 Advanced Tuning AOS and client setup Clustering AOS configuration
Caching Buffer size

26 Advanced Tuning AOS and client setup Client configuration

27 EP troubleshooting Enterprise Portal performance Process Monitor
Network Monitor ‘Performance Tester’ tool Windows Performance Monitor

28 Slow Standard Batches Typical problems:
Invoice posting, inventory closing, master planning, settlements… AX is built from complex code, disable not used one (e.g. credit limit checks) Write your custom posting using a minimum number of standard objects

29 Code Redesign Skip delete actions, use doDelete(), doInsert(), doUpdate(), maintain consistency in other way Normalize tables (e.g. for faster updates or data reduction) De-normalize tables (e.g. for faster reads) Use direct SQL / stored procedures AX may generate a filtered cross join instead of inner join. T-SQL inner join can improve work orders – magnitudes faster

30 Data Cleanup Parm data Closed Orders Old journals Temp data Logs
Standard AX cleanup procedures

31 Archive Data Move only master data, balances and open transactions during upgrade Intelligent data management framework Purge function removes or deletes data from a set of related tables, from the production database Archive function moves data from all related tables to an archive database which can be used for reporting purposes

32 External Tools for Heavy Imports
SQL integration services Direct T-SQL integrations, bulk insert DIXF Third-party solutions

33 Conceptual Redesign Reduce number of dimensions
Choose parameters that require less calculations Shorter retrospective Simple costing model 120 page sales report run every week VS a sales cube? Detailed transactions in AX imported from another system VS just a consolidated view? Apply misc. charges to 20K invoice records VS post 10 expense lines?

34 Case Study Wrong Hardware configuration Problem: Steps: Solution:
Customer complains that the system is slow for all users during the first hour of work Steps: Log into DB and AOS server via RDP Check CPU and RAM usage Solution: There was only 8 GB of RAM on the SQL server machine. Move SQL to another machine, add more RAM

35 Case Study Design relations by Alternative key instead of RecID
Problem: Import large plain CSV files into one header and five child tables. With RecID only one-by-one insert is possible Solution: Generate a custom alternative key (line number in the file), create an additional alternate-key based relation, use bulk insert operations

36 Case Study Select field list
A billing invoicing batch was ~5 times faster (48 hours to 9 hours) after removing “not used” fields form select statement fields list

37 Case Study Join optimization Operation performance
increased > 10 times after replacing one outer join with 6 separate inner joins

38 Planning for Performance
Define measurable and realistic performance benchmarks in your contract or TDD Estimate the amount of data, legacy data, yearly increment, peak loads (e.g. e-commerce during the Christmas season) Estimate amount of users, concurrent users, legal entities, web-users, posted lines per hour, yearly incremental users and peak values Design heavy jobs to run at night or off-peak times Check recommended MS hardware requirements and plan the budget in advance

39 Planning for Performance
Define critical time-sensitive tasks, like Invoicing must finish during the night before the 1st day of a month Customer on the phone should not wait more than 10 seconds to create an order Plan and schedule performance tests in advance Your test data should be as close to the production system as possible. Ideally – a backup of production DB Try to emulate production workload and system topology

40 Planning for Performance
Challenge: There could be an issue in standard AX code! Do a ‘soft’ go-live: do not put your client’s business under too much risk Run most critical processes through performance monitoring tools in advance, ideally during the Build Phase Identify data volumes to be processed, and plan alternative solutions in advance

41 Summary Addressing performance
Problem identification Troubleshooting: conceptual approach Most efficient and effective tools Implementation examples: issues, ways to troubleshoot, results Planning for performance

42 Thank you! Questions? Suggestions? Comments?
Anna Kupchenko

43 Please fill out your evaluation
THANK YOU Please fill out your evaluation


Download ppt "Dynamics AX: Performance that Exceeds Expectations"

Similar presentations


Ads by Google