Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Anna Kupchenko| Celenia Software Dynamics AX: Performance that Exceeds Expectations."— Presentation transcript:

1

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

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

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

5 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 Problem Identification

6 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. Problem Identification

7 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… Problem Identification

8 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! Performance Troubleshooting

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

10 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: http://msdn.microsoft.com/en- us/library/ms175518.aspxhttp://msdn.microsoft.com/en- us/library/ms175518.aspx Performance monitor: http://technet.microsoft.com/en- us/library/cc749115.aspxhttp://technet.microsoft.com/en- us/library/cc749115.aspx Infrastructure

11 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 Infrastructure

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

13 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 AX: Finding bottlenecks

14 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 Code review

15 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 Code review

16 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 Code review

17 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 Code review

18 New and hot! Performance Benchmark SDK for Dynamics AX: http://technet.microsoft.com/EN- US/library/dn527257.aspxhttp://technet.microsoft.com/EN- US/library/dn527257.aspx Trace Parser: – Is an optional component on an AX install Code Profiler: – Available inside MorphX Tools – AX layer

19 Traceparser tool. SQL queries

20 Traceparser tool. Top 5

21 Traceparser tool. Callstack

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

23 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 Advanced Tuning

24 Large data sets Use batch parallelism http://blogs.msdn.com/b/axperf/archive/2012/02/24/batch-parallelism-in-ax-part-i.aspx Pre-process data for more of an even load Consolidate data Advanced Tuning

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

26 AOS and client setup Client configuration Advanced Tuning

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

28 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 Slow Standard Batches

29 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 Code Redesign

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

31 Move only master data, balances and open transactions during upgrade Intelligent data management framework http://technet.microsoft.com/en-us/library/hh378082.aspx http://technet.microsoft.com/en-us/library/hh378082.aspx 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 Archive Data

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

33 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? Conceptual Redesign

34 Wrong Hardware configuration Problem: – 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 Case Study

35 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 Case Study

36 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 Case Study

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

38 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 http://www.microsoft.com/en-us/download/details.aspx?id=11094 Planning for Performance

39 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 Planning for Performance

40 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 Planning for Performance

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

42 Questions? Suggestions? Comments? Anna Kupchenko (gak@celenia.com)gak@celenia.com Thank you!

43 THANK YOU Please fill out your evaluation


Download ppt "Anna Kupchenko| Celenia Software Dynamics AX: Performance that Exceeds Expectations."

Similar presentations


Ads by Google