AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 02.11.2013, 11:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
X++: AxBuild.exe for Faster Full Compile of X++
Источник: http://blogs.msdn.com/b/x/archive/20...pile-of-x.aspx
==============

In this post we describe the new AxBuild.exe utility that you can use to greatly increase the speed of a compilation of all X++ source code. AxBuild became available in November 2013 as part of cumulative update 7 (cu7) for Microsoft Dynamics AX 2012 R2.

There are initial clarifications to understand about AxBuild:
  • The legacy compilation options in the MorphX client remain available.
  • AxBuild involves the compilation of X++ source code into AX p-code, but it does not involve the subsequent generation from p-code into .NET Framework CIL.
  • AxBuild can compile all the X++ source code on the system, but its scope cannot be narrowed to compiling just a subset of classes and other elements.
Sometimes a compilation of all X++ source code is needed. Such occasions include:
  • Setup of AX 2012 R2.
  • Installation of upgrades and hotfixes.
  • Migration from development to test, staging, and production environments.
1 Phases of any X++ Compile Process

In the earlier blog post, How the X++ Compiler works for AX2012 we gave a high level explanation of the processes that compile X++. Three major phases were described:
  • Phase 1: Class declarations and method signatures.
  • Phase 2: Metadata validation and method bodies.
  • Phase 3: Recompilation of elements that had preliminary errors.
These phases apply to the compile process under AxBuild just as they apply to the compile process you initiate by clicking in the MorphX client menus.

2 Legacy Client Tier Compile of Full X++

Until today the X++ compilation and metadata validation processes were always executed on the client tier using one single thread. Figure 1 represents the X++ compilation process that runs on the client. The client requests metadata from the Application Object Server (AOS) tier. Metadata is needed for every element that must be compiled or validated. The metadata stored in SQL Server is de-serialized by the AOS into the internal representation of a TreeNode. Then the metadata is transferred over the network to the client. If the client and AOS are installed on the same computer (the “one box” configuration), a process-to-process communication over RPCs is used in place of a two tier network communication.

After the client received the metadata, the client compiles the X++ source code. The X++ source code is translated in AX p-code. The AX runtime understands the p-code and can execute it. The compile process also validates any references to other elements that are specified through properties. Information about any errors is written to a log. After each element is compiled, the client enriches its representation of the element with updated metadata and p-code. Next the client sends the enriched representation to the AOS. The AOS saves the updated element in the model store database.



Figure 1. Metadata transfer during compilation and validation process.

Agile development benefits from the client tier compile of X++, because the development cycles often require compilation of a narrow subset of all classes and forms etc. In the MorphX client the developer can compile individual elements such as one class. The developer can test the change, fix the code, recompile the one class, and retest. The compilations of individual classes complete in a second or two, so these agile development cycles are kept efficient.

Also, the compiler on the client tier is fully leveraged and integrated with productivity tools like Cross Reference, IntelliSense, and Visual Studio.

3 New AOS Tier Compile of Full X++

For a full X++ compile, the legacy client tier scenario is unpleasantly slow. Having the compilation run on the client is ironic for the following reasons:
  • One irony is that the source code and the metadata are on the server computer, yet the compilation that needs the source and metadata is run on the client computer.
  • The server computer is typically more powerful in terms of hardware.
In cu7 we are introducing AxBuild, an X++ compilation management utility that you run on the same server computer that hosts the AOS. AxBuild achieves its speed gains for the following major reasons:
  • The client is excluded from the scenario. This eliminates the network communication from the AOS to the client and back. See Figure 2.
  • AxBuild runs on a server computer that typically has more powerful hardware than the client computer has.
  • AxBuild runs the compilation as a 64 bit process, instead of a 32 bit process as with MorphX. This allows more active memory to be addressed.
  • AxBuild compiles subsets of AOT elements in parallel, whereas the client compilations process uses just a single thread.


Figure 2. Parallel compilation on the server tier.

Exclusion of the Client Tier: In the legacy full X++ compilation that runs on the MorphX client, the network transmission of information from the AOS to the client and back adds 28% to the wall clock duration of the compilation process. Even if the client is installed on the same computer with the AOS, transmissions through RPCs are needed.

Parallel Compilation: AxBuild starts multiple temporary AOS processes. These AOS worker processes run in parallel. AxBuild coordinates their compilation acitivities. AxBuild does the following:
  • Assigns a subset of AOT elements for compilation compile to each temporary AOS.
  • Collects the results from each temporary AOS, and writes the results to a log file.
AxBuild calculates the optimal number of temporary AOS workers as best it can, and it reports its calculation to its console. The calculation is based on the number of CPUs that the server computer has. However, you can fine tune and control the number of AOS workers by using the /workers= parameter. Factors you might consider include:
  • Amount of active memory that the server computer has.
  • CPU demands that other processes might make while the compilation runs.
4 Performance Gain

The performance gain depends on the available resources in the computer where the parallel compilation process is being executed, including number of CPU’s and memory available. However to put some numbers in perspective, we have taken some careful measurements.

4.1 Configuration
  • MorphX client and AOS server installed on the same server computer.
  • 4 Cores 3.7 Giga Hertz.
    • Hyper-Threading enabled, which logically doubles the CPU count.
  • 32 Gigabytes of physical active memory.
  • 6.0 Gigabits/s SATA Controller
  • Windows Server 2012
  • SQL Server 2012 SP1 Enterprise (no memory constraint)
  • Virtual page caching disabled.
  • Fresh AX 2012 R2, with cu7 installed.
4.2 Results of Performance Test
  • AxBuild calculated 9 for AOS workers: 10 minutes and 40 seconds.
  • MorphX client for comparison: 2 hours and 26 minutes.
5 Miscellaneous Details
  • When you use the AOT of the MorphX client to import a .XPO file, the resulting X++ compile occurs only on the client tier.
  • All generation of .NET Framework CIL occurs only on the client.
  • The MorphX client is the Development Workspace window in ax32.exe.
  • Even though the name of the AOS program ax32serv.exe contains ‘32’, it is a 64 bit program.
  • AxBuild makes obsolete the AOS parameter -startupcmd=CompileAll that was described in KB 2844240, as in:
    ax32serv.exe -startupcmd=CompileAll
  • For additional important information about AxBuild, see our formal Help topic on MSDN titled AxBuild.exe for Parallel Compile on AOS of X++ to p-code.





Marcos Calderon Macias
Gene Milener

November 2013

.




Источник: http://blogs.msdn.com/b/x/archive/20...pile-of-x.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
За это сообщение автора поблагодарили: Logger (3), b_nosoff (1).
Старый 02.11.2013, 14:20   #2  
mazzy is offline
mazzy
Участник
Аватар для mazzy
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
Лучший по профессии 2009
 
29,472 / 4494 (208) ++++++++++
Регистрация: 29.11.2001
Адрес: Москва
Записей в блоге: 10
мдя...
Старый 04.11.2013, 03:07   #3  
Alex_KD is offline
Alex_KD
Участник
AxAssist
MCBMSS
Соотечественники
 
522 / 362 (14) ++++++
Регистрация: 06.07.2006
Адрес: Melbourne, Down Under
Цитата:
Сообщение от mazzy Посмотреть сообщение
мдя...
Новость то хорошая. 10 минут на полную компиляцию против сейчашних 2-3-4 часов вполне клево. У нас nightly build около 5 часов собирается.

Реализация правда не фонтан (наверное поэтому "мдя"). Еще одна консольная програмка для ахапки....развелось их уже.

Я правильно понял что "по человечески", тоесть прям из клиента, это дело запустить нельзя без доработок?
__________________
AxAssist 2012 - Productivity Tool for Dynamics AX 2012/2009/4.0/3.0
Старый 04.11.2013, 15:46   #4  
Freeangel is offline
Freeangel
Участник
 
173 / 55 (2) ++++
Регистрация: 01.04.2005
Почему-то после компиляции данной утилитой компиляция CIL выдает ошибку
Старый 04.11.2013, 22:28   #5  
MikeR is offline
MikeR
MCT
Аватар для MikeR
MCBMSS
Лучший по профессии 2015
Лучший по профессии 2014
 
1,628 / 627 (24) +++++++
Регистрация: 28.11.2005
Адрес: просто землянин
Коллеги, нижайше прошу прикрепить проектик к сообщению, а то пост удалили, и как заполучить желаемое не понятно пока.
__________________
Axapta book for developer
Старый 05.11.2013, 19:19   #6  
Freeangel is offline
Freeangel
Участник
 
173 / 55 (2) ++++
Регистрация: 01.04.2005
--компиляция внешней утилитой--
C:\Program Files\Microsoft Dynamics AX\60\Server\SM_DAX2012R2_WRK\bin>axbuild.exe xppcompileall /s=01 /altbin="C:\Program Files (x86)\Microsoft Dynamics AX\6.2\Client\Bin"

где в параметре /s указывается номер AOS
За это сообщение автора поблагодарили: Logger (1).
Старый 07.11.2013, 13:11   #7  
f18 is offline
f18
Участник
Аватар для f18
Дети Юза
 
188 / 101 (4) +++++
Регистрация: 09.08.2005
А есть такая же, только для перекрестных ссылок? (может кто слышал/видел)
Старый 07.11.2013, 13:30   #8  
Vadik is offline
Vadik
Модератор
Аватар для Vadik
Лучший по профессии 2017
Лучший по профессии 2015
 
3,631 / 1849 (69) ++++++++
Регистрация: 18.11.2002
Адрес: гражданин Москвы
Цитата:
Сообщение от Alex_KD Посмотреть сообщение
Я правильно понял что "по человечески", тоесть прям из клиента, это дело запустить нельзя без доработок?
Нет, это утилита запускаемая на стороне AOS и с клиентом не взаимодействующая (собственно, во многом потому и работает быстро). Т.е. "по-человечески" - нельзя, но автоматизировать ночной билд через скриптик - можно и даже нужно
__________________
-ТСЯ или -ТЬСЯ ?
Старый 07.11.2013, 19:41   #9  
lvan is offline
lvan
Участник
Аватар для lvan
Лучший по профессии 2014
 
856 / 82 (4) ++++
Регистрация: 15.04.2011
Записей в блоге: 1
а оригинальный пост то потерли почему-то
Старый 08.11.2013, 01:12   #10  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
daxmusings: What You Need To Know About the 15-minute CU7 Compiler
Источник: https://community.dynamics.com/ax/b/...-compiler.aspx
==============

If you hadn't heard yet, CU7 has been released for AX 2012 R2. Lots of things to get excited about (comparing reports anyone?), the thing I'm most excited about is the new compile optimization...(read more)

Источник: https://community.dynamics.com/ax/b/...-compiler.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 08.11.2013, 02:00   #11  
Alex_KD is offline
Alex_KD
Участник
AxAssist
MCBMSS
Соотечественники
 
522 / 362 (14) ++++++
Регистрация: 06.07.2006
Адрес: Melbourne, Down Under
Цитата:
Сообщение от Vadik Посмотреть сообщение
Нет, это утилита запускаемая на стороне AOS и с клиентом не взаимодействующая (собственно, во многом потому и работает быстро). Т.е. "по-человечески" - нельзя, но автоматизировать ночной билд через скриптик - можно и даже нужно
Спасибо. А было бы удобно - полный рекомпайл пока обедаешь. С другой стороны можно и скриптик.....

Надо бы отметить - "AXBuild.exe needs to be executed with hot-swap disabled.". Не совсем понятно почему, но на всех девелоперских машинах у нас эта опция активна.

Цитата:
А есть такая же, только для перекрестных ссылок? (может кто слышал/видел)
А еще синхронизировать Data Dictionary на всех процесорах сразу, а не на одном. Чтото они там сломали в 2012, AX теперь синхронизироваться пытается на каждый чих.
__________________
AxAssist 2012 - Productivity Tool for Dynamics AX 2012/2009/4.0/3.0
Старый 10.11.2013, 16:11   #13  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
axzaptech: Compile Whole AX Code in less than 30 min AX 2012 R2
Источник: http://axzaptech.wordpress.com/2013/...in-ax-2012-r2/
==============

Hi All,

With the release of cumulative update 7 for Microsoft Dynamics AX 2012 R2, Microsoft has launched a new command line tool to compile the complete X++ code. This tool has reduced the compilation time and 13 times faster. It can compile the whole AX in 30 mins.

For further details,

http://msdn.microsoft.com/library/d6...5bfb488e3.aspx




Источник: http://axzaptech.wordpress.com/2013/...in-ax-2012-r2/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 10.11.2013, 22:13   #14  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
goshoom: AxBuild.exe
Источник: http://dev.goshoom.net/en/2013/11/axbuild/
==============

Just a quick one to bring your attention to something what you may have missed.

Microsoft released a command-line tool for Dynamics AX R2 CU 7 called AxBuild. It’s capable of compiling X++ code directly on AOS and doing it in several threads in the same some time, which has a huge effect on performance. Microsoft even achieved 92% (!) improvement in compilation time (in a carefully built environment).

One more advantage is that it’ll be easier to get response from a running compilation (that’s a trouble particularly with compilations executed by automated scripts). Unfortunately AxBuild doesn’t cover compilation to CIL, but hopefully we’ll get that too, at some point.

I haven’t had a chance yet to play with it, but Tommy Skaue did, so check out his blog post You got to love AXBuild Compiler Tool.



Источник: http://dev.goshoom.net/en/2013/11/axbuild/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 30.11.2013, 08:51   #15  
DSPIC is offline
DSPIC
Боец
 
1,077 / 1234 (44) ++++++++
Регистрация: 11.04.2008
Какая-то убогость. Я потратил 10 часов чтобы понять, что сие чудо ничего не делает.
Вываливает какие-то ошибоки компиляции, которых на самом деле нет, после компиляции CIL собирается битый. После многочасовых баданий - запустил классичиский compile и все проблемы с приложением ушли.
Возможно, нужно было отключть hot swap, возможно нужно было сделть какой-то cleanup, может ещё что-то забыл, то блин, товарищи...

Но стоит отдать должное, визуальная компиляция идет действительно быстро
Старый 30.11.2013, 11:12   #16  
Ivanhoe is offline
Ivanhoe
Участник
Аватар для Ivanhoe
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
 
4,143 / 2155 (80) +++++++++
Регистрация: 29.09.2005
Адрес: Санкт-Петербург
На нескольких проектах используем, полет нормальный. Количество сэкономленных часов скоро перекроет время перехода cu6 -> cu7
__________________
Ivanhoe as is..
Старый 30.11.2013, 14:04   #17  
Vadik is offline
Vadik
Модератор
Аватар для Vadik
Лучший по профессии 2017
Лучший по профессии 2015
 
3,631 / 1849 (69) ++++++++
Регистрация: 18.11.2002
Адрес: гражданин Москвы
Цитата:
Сообщение от DSPIC Посмотреть сообщение
может ещё что-то забыл, то блин, товарищи...
axutil.exe schema ?
__________________
-ТСЯ или -ТЬСЯ ?
Старый 28.04.2014, 22:17   #18  
f18 is offline
f18
Участник
Аватар для f18
Дети Юза
 
188 / 101 (4) +++++
Регистрация: 09.08.2005
Цитата:
Сообщение от f18 Посмотреть сообщение
А есть такая же, только для перекрестных ссылок? (может кто слышал/видел)
Для построения перекрестныйх ссылок видел писали джобы кот добавляет много батчей (для каждого элемента АОТ - таблицы, менюшки и т.д. - по одному джобу) и они выполняются батчем потихоньку ... - построение происходит не прям мгновенно, но то что можно хотябы в каком то обозримом и понятном времени их получить - так и да .
Теги
ax2012, axbuild.exe, compilation, компиляция, полезное

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axtools: Compile… oh no! Blog bot DAX Blogs 4 26.04.2013 09:55
daxmusings: AX 2012's Hidden Compile Errors Blog bot DAX Blogs 0 07.02.2013 10:11
emeadaxsupport: AX 2012 Compile error in Web Control after you updated the proxies in Visual Studio Blog bot DAX Blogs 0 20.06.2012 15:11
axtools: Let's compile the thing! Blog bot DAX Blogs 0 03.04.2012 03:21
axblog4u: Dynamics AX2012: Table Full Text Indexes Blog bot DAX Blogs 0 26.09.2011 13:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 16:53.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.