AX 2012 (R2) Compilation Performance and Best Practice

This question is answered

I would like to hear others share their experience with possible best practice and recommendations around getting AX 2012 compilation time down to a bare minimum.

We know a X++ compilation involves writing to disk on the AOS server and writing transactions to the model database.

We used to have a Best Practice Whitepaper and Checklist for Dynamics AX 2009, and many of the points are still valid for the next generation Dynamics AX. I still would like to hear from the community what hints and tips they would like to share regarding this specific process; compiling AX 2012.

AX2012 may take 2-3 hours. AX2012 R2 over 5 hours. Can anything be done to reduce the compilation time without "triple" the hardware?

Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no

All Replies
  • Alright, I just posted it. Read all about it here: daxmusings.codecrib.com/.../dynamics-ax-2012-compile-times.html

    40 minutes. That's right :-)

  • nice info Joris, just out of curiosity, could you try running the test on the same system using tcpip instead of shared memory? I'd be curious to know the porformance hit incurred from just that setting alone.

  • Yes I've been thinking about doing a few things like that. Also trying to clone the disk contents on a regular 7200RPM disk to see the impact of the SSD.

    I'm a little hesitant to do it now, since my team is now very excited to use this machine for builds lol. I will see if i can try over the weekend perhaps!

  • Joris, WTF :)

    That was an awesome idea to turn of tcp/ip.

    I really need to check that.

  • FYI on a thread posted by the Microsoft AX Tools Development team on this long time compile issue - and note that a hotfix will be released which will help for R2 in a short period of time:

    blogs.msdn.com/.../compile-oh-no.aspx

  • Also, someone on my blog noted that using shared memory instead of tcp/ip reduced his compile time from 4h to 3.5h so it does make a difference. In talking with the Microsoft compiler team about this, their tests have shown that SQL is smart enough to use the shared memory over tcp/ip are both available. So it sounds like you don't have to turn off tcp/ip necessarily. Not sure if the version of SQL matters on this "smart" decision of protocols.

  • please mark reply from  Peter Villadsen as verified answer

  • Hotfix for R2 compiler speed released: blogs.msdn.com/.../ax2012-r2-hotfix-available-improves-compile-speed.aspx

  • Hi,

    I just tested the released compile-optimization support.microsoft.com/.../KBHotfix.aspx, and it was not an amazing improvement.

    My test server, VMWare with 2 vCPU (Intel X5670 @ 2,93 GHz), 8 GB RAM with AOS and client (database on a dedicated SQL Server), a full compile was reduced from approx 5 hours down to 3 hours, 40 mins.

    An improvement, but still not satisfying.

    --------

    Christian Moen | Dynamics AX System Engineer, Avanade Norway

  • Just a short update to my previous comments in this thread - did a new install on the production platform (Hyper-V) and with WinSrv2012 Standard as OS with AX 2012 R2 CU1 slipstreamed > just under 3 hours for the x++ compilation during the initial check list.

    I think that's a reasonable (acceptable) compilation time given the footprint of AX 2012 R2 and in a virtual implementation. I can post the Performance Monitor collection taken (CPU) if it's of interest to the community. Maybe I'll manage to test the effect of the newly released hot fix too (can't promise due to a tight schedule).

    All in all this thread should provide the community with the information needed to discuss pros and cons (physical, virtual, importance of CPU frequency, storage etc.).

    Best regards

    AX2009Tech aka Back2AX, Norway

  • Perfect Joris,

    I've setup a specific hardware as well just to compile R2. You can check numbers here. This is compiling RAW AX 2012 R2.

    http://axbenchmark.github.com

    Feel free to send me pull requests on github adding your hardware and your compile times

    Thanks

  • Do you have the R2 compile hotfix installed for your benchmark?

    I just compiled R2 CU1 (6.2.1000.156) including some custom code on an older i7 Q720 laptop (1.6Ghz only) and it was 3hrs, 5 mins. Without the compiler hotfix, because I want to compare the difference :-)

  • It's a great time!!!

    That compilation time was for AX 2012 R2 without any CU1. That hardware was cheap, it cost me total $700 (HP desktop server + SSD)

    I've just went up to 6.2.1000.1013 with the compile hotfix will test it. I didn't read your former posts, don't know if there's already a small job or class but did you create code to actually time it? We could then do that and share on the seconds.

    I also have no models other than some small modifications. I also turned off some license codes.

  • I time it because I run this build automated using TFS, and TFS times everything. You can put some code in the AOT though to get an accurate count, I'll have to check where, we've done it before.

  • I've captured timings of compiles by adding some code to the SysCompileAll::main method in the testing environment, then running the compile from the menu item in System Administration or launching the class directly.

        System.Diagnostics.Stopwatch    stopWatch;
        System.TimeSpan                 elapsed;

        if (SysCompileAll::prompt())
        {
            stopWatch = new System.Diagnostics.Stopwatch();
            stopWatch.Start();

            infolog.messageWin().activate();

            SysCompileAll::flushClient();
            SysCompileAll::compile();

            SysCheckList::finished(classnum(SysCheckListItem_Compile));
            SysCheckList::finished(classnum(SysCheckListItem_CompileUpgrade));
            SysCheckList::finished(className2Id(classStr(SysCheckListItem_CompileServ)));

            stopWatch.Stop();
            elapsed = stopWatch.get_Elapsed();

            info(strFmt("Elapsed time: %1", CLRInterop::getAnyTypeForObject(elapsed.ToString())));
        }