web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Speed up your D365FO development environment

nmaenpaa Profile Picture nmaenpaa 101,160 Moderator

How can it be so slow? Many Dynamics 365 for Finance and Operations developers are struggling with performance issues in the development environment. Using the code editor, building the project, starting the application and debugging seem to take forever, consuming time and money.

In this article I will describe how to improve the performance of both Azure hosted and local development environments, while still optimizing the cost of the system.

What is required for good performance?

The key for improving the performance is to understand what causes good or bad performance in the dev environment. Already in AX2012 the disk system performance was the most important factor, and most common bottleneck in the overall system performance. This hasn't changed in D365FO, but the characteristics of the development system have changed.

In AX2012 the source code was stored in the database, so the database performance was critical in development. In D365FO the source code is stored in tens of thousands of files in the file system, in AOSService/PackagesLocalDirectory folder. Having quick access to these files is crucial for the performance.

So, let's have the whole server running on SSD disks, right? If you can, that's definetely a good option. But SSD disks can be expensive. So you might want to put only the source code and the application binaries on SSD disk, and run the OS and other stuff on more affordable regular disks. In the next chapter I will describe how to set this up on Azure hosted VM and a local VM.

What about RAM and CPU, then? You need to have enough of both, but actually you don't need that much. 16 GB of RAM and 4 CPU cores can be enough in a development environment. And if you have 32 GB of RAM, you are definetely doing well. SQL Server will use as much memory as it can, so you must set a limit for it. In SQL Server Management Studio, right click your server in the Object explorer and go to Properties - Memory. In dev environment you should give about 50% of the total RAM for SQL Server.

SQL-Server-memory.png

Set up SSD disks in the dev environment

Let's look on the different types of D365FO development environments, and how to set them up to use SSD disks.

Cloud hosted environment

These environments are deployed from Lifecycle Services into your Azure subscription. You can choose the VM size and adjust the VM to achieve optimal performance. You must choose a DS series VM in order to use Premium Storage (SSD) disks. DS12v2 (4 CPU cores and 28 GB of RAM) is a good choice, DS13v2 (8 cores and 54 GB RAM) is an overkill with twice the price.

If you use DS12v2 with 3 x 128 GB SSD disk, the price is still quite low but the performance is much better than with standard disks.

In Disk space configuration, select 3 disks and disk size 128 GB. This will make the system use P10 disks which cost about 16 EUR / month per disk.

Disk-space-configuration.png

In the deployment setup, in Disk Space Configuration, select Premium Storage.

Premium-storage.png

In Managed Disks, select None.

If you want to be even more cost conscious, you use reduce the number of disks to 2. Or you could deploy the environment on Standard storage, then add additional Premium Storage disk and move only the AOSService folder to the new disk. But the smaller and cheaper Premium Storage disks have slower performance so you will have to test if the performance is acceptable to you.

Moving AOSService folder to another disk is described in the next chapter.

Downloadable VHD

If you run the VHD locally on your laptop, you usually don't have much choice on the disk system - you use what you have. But if the VM is hosted on a separate host in your company network, you can choose to run the VM on normal hard disk (SSD) but attach an additional small SSD disk to it. 15 GB should be sufficient for us. Of course if you can afford to run the whole VM on SSD, it's even better, but having the source code and the binaries on SSD is the most important thing.

The dev VHD is set up in a way that everything is running on C: drive. In order to move the source code to the SSD drive, you need to change some settings in the system. Here we assume that your SSD drive is mapped as E: drive.

1) Stop following services:

  • - World Wide Web Processing Service
  • - Management Reporter 2012 Process Service
  • - Microsoft Dynamics 365 Unified Operations: Batch Management Service
  • - Microsoft Dynamics 365 Unified Operations: Data Import Export Framework Service

2) Move folder C:\AOSService to  E: drive

3) Open RegEdit and find HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dynamics\AX\Development. Change the value of DefaultConfig key to point to E: drive instead of C: drive

DynamicsDevConfig-registry.png

4) Find registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DynamicsAxBatch. Change the value of ImagePath to point to E: drive instead of C: drive

Batch-registry.png

5) E:\AOSService\PackagesLocalDirectory\Bin\DynamicsDevConfig.xml - do a find and replace, changing C:\AOSService to E:\AOSService

6) E:\AOSService\webroot\Web.config - do a find and replace, changing C:\AOSService to E:\AOSService

7) In IIS manager, go to Sites - AOSService - Advanced settings and change Physical path to E:\AOSService\webroot

IIS-Physical-path.png

8) In IIS manager - Sites - Applications, change Physical path of Product configurator from C: drive to E: drive

Product-configurator.png

9) On the Desktop, change the AdminUserProvisioningTool shortcut to point on E: drive instead of C:

AdminUserProvisioning.png

Restart the computer to make sure that all changes will become effective.

Microsoft managed environment (Sandbox tier 1)

You get one of these with the D365FO subscription, and can buy more as add-ons. These environments don't seem to have performance issues, and are already running on SSD. In addition to that, you don't have any control over the server setup, so we will not discuss them in this article. 

Conclusion

Boosting the performance of the D365FO dev machine is a relatively simple task. It might add some cost, but the added developer productivity should justify using SSD in most cases. 

Happy development!

Comments

*This post is locked for comments

  • Community Member Profile Picture Community Member 6,118
    Posted at
    Has anyone tested to SYMLINK the AOSService folder instead of changing registry? This way you can just move/copy the AOSService folder and point the AOSService to another drive. Have to either rename the original AOSService folder or delete it. Powershell: New-Item -Path c:\AOSService -ItemType SymbolicLink -Value D:\AOSService
  • nmaenpaa Profile Picture nmaenpaa 101,160 Moderator
    Posted at
    Mark, we're using D12v2 as a build server. But it depends on your requirement. If you want to have just a nightly build, the performance is not critical. But if you're using gated check-in and need to build after every check-in, then you probably want it to complete as quickly as possible. AmmarSalah, seems that you asked this question also on the forum and the problem is solved: community.dynamics.com/.../moving-c-aosservice-folder-to-a-new-folder-e-aosservice-ssd-dynamicsaxbatch-service-does-not-start-up-on-new-vhd-10-0-17-release
  • mblevins Profile Picture mblevins 81
    Posted at
    Thank you for the article, it was very helpful! Could you recommend specs for a build /test cloud hosted environment? I am working with a client with a smaller user base and was trying to find the balance between cost and efficiency.
  • AmmarSalah Profile Picture AmmarSalah 61
    Posted at
    Nikolaos, this is not working on the new VHD 10.0.17, are there any extra steps?
  • Odaihoseh Profile Picture Odaihoseh 50
    Posted at
    Thank you Nicolaos I used the above instructions and it is working fine with in downloaded VHD version 10.0.9 to move AOSService from C: to D: SSD drive but after that i try to install deployable package for build 10.0.10 PU34 , i got the below error in step : 43 Executing step: 43 Update script for service model: PayrollTaxModule on machine: D365FO-DEV02 Update Payroll tax module Installation directory C:\AOSService\PackagesLocalDirectory was deleted and cannot be serviced. A full installation of PayrollTaxModule is required. The step failed The step: 43 is in failed state, you can use rerunstep command to debug the step explicitly at Microsoft.Dynamics.AX.AXUpdateInstallerBase.RunbookExecutor.ExecuteRunbookStepList(RunbookData runbookData, String updatePackageFilePath, Boolean silent, String stepID, ExecuteStepMode executeStepMode, Boolean versionCheck, Parameters parameters) at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.InstallUpdate(String[] args) at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.Main(String[] args) I think something missing , you have to note that i install same deployable package in another VM without changing drive , and it is working fine with me .
  • Bijan Ghofranian Profile Picture Bijan Ghofranian 1
    Posted at
    Nikolaos Mäenpää Thank you for sharing this. I believe it makes sense to bite the bullet and go with premium storage (SSD) to have better performance and reduce wait times.When choosing a standard deployment option and going with HDDs, performance is compromised and we end up spending quite a bit of time waiting and waiting. These wait times when added in a month's time multiplied by one’s pay rate would amount to more money than the cost of premium storage which defeats the purpose of trying to save money.
  • DynamicBas Profile Picture DynamicBas
    Posted at
    Thank you for sharing this content, much appreciated! For Cloud hosted environments, you mention "In Managed Disks, select None." Why not select a managed disk option HDD/SDD? What effect would this have on performance?
  • Teemu Miettinen Profile Picture Teemu Miettinen 65
    Posted at
    Clarifying a bit more on the last sentence. The min is for Build/Test topology environments, the development environments as you spoke above does not have the same limitation.
  • Teemu Miettinen Profile Picture Teemu Miettinen 65
    Posted at
    LCS is now checking on minimum amount of the disks, and its now 4. Message: The value for the customization 'Enter the maximum number of disks to attach to the Build virtual machines:' must be an integer greater than or equal to '4'