Curious what Dynamic People can do for you?

+ 31 (0) 20 303 24 70
Logo
Blogs Cloud/Azure Tech Blogs
26 April 2022 Jorgen Tol

Dedicated hardware development in D365 F&SCM

devblogjorgen

Important changes

With the release of D365 some important things changed with regards to development activities.

  1. Instead of using one development environment for all developers, every developer needs their own development server
  2. The use of visual studio
  3. The inability to debug in test/production environments

The typical setup we have is to use one development CHE(cloud hosted environment) per developer, per customer. The CHE’s are deployed sized to DS12_v2 as we find this to be a good balance for performance vs costs.

Also, we make sure to auto shutdown these CHE’s to save on costs.

This results in a few annoyances.

  1. It takes time to start a development environment before you’re able to develop
  2. If during the day you would like to do a small task for another customer you have to start another environment and wait again
  3. Visual studio is nice to develop in but can be quite slow

While we’ve only used CHE’s to develop on, Microsoft also provides a VHD (virtual hard disk) file for on premise deployments.

You can use this file to deploy development servers on your own hardware.

I was curious to see if taking this VHD, and cloning it to a physical hard disk to use in dedicated hardware would improve the speed and smoothness of the development experience, and I decided to perform an experiment.

The experiment

Using my own consumer hardware I attempt to create a development box for D365.

On this box I want to try two things:

  1. Run a VM from here and compare the performance
  2. Clone the VHD to the disk, boot straight into the development box and compare performance

The relevant hardware:

CPU: AMD Ryzen 9 5900X (12 cores, 24 threads)

RAM: 32GB

SSD: PCIe 4.0 NVMe SSD.

To compare performance, I did two things.

  1. Compile our (amazing) C4C ISV solution and record the time.
  2. Open a few classes, tables, and SSRS reports to get a feel for how fast visual studio responds

Note that I did not open the D365 client and check the performance here. This is because to setup the environment I would need to create an app registration in our Azure AD, which I do not have access to at this time. This would be another interesting benchmark though.

The procedure:

The VHD file was downloaded from LCS and transferred to this machine.

From here I created a hyper V machine, assigned 12 GB RAM to it, and attached the VHD file

After this I could start the VM.

Using the instructions in this link, I added the VHD as a boot entry so that the PC could boot straight into it. This means all resources are dedicated solely to the development environment.

Note that I tried actually cloning the VHD to the disk, but the machine did not boot into the OS. This can probably be remedied with extra effort. but I think any extra performance improvements gained will be negligible.

 

The results

  1. Compilation benchmark
Machine C4C Compilation time
Azure CHE 08:33
Hyper-V VM 03:25
Direct boot into VHD 1:45

 

As you can see right away the improvements in compilation time are quite impressive.

Using the Hyper-V VM cut the compilation time in half.

The dedicated machine cut the compilation time in half again.

A screenshot of the machine hard at work on a compile.

My theory is most of these improvements come from the speed of the SSD. I looked at the performance during the compilation and the VM never even used all of the 12GB of RAM assigned to it. Processor usage also never exceeded more than about 15%

Microsoft offers the option for premium storage for CHE’s which would increase performance, but unfortunately this means paying for the storage even when the machine is turned off. This makes it a very expensive option.

  1. Visual studio performance benchmark

 

Machine VS feel
Azure CHE Slow, opening a file can sometimes take up to 20 seconds
Hyper-V VM Fast, opening files is generally fast, but it can sometimes still take a few seconds to open
Direct boot into VHD Instant, all files tested opened instantaneously.

 

For this benchmark I was more interested in the feel of the development experience than in hard numbers. Therefore, I didn’t record numbers but instead wrote down my overall experience using the system.

It amazed me when I opened up visual studio for the first time on the “Direct boot machine”. Every file I clicked opened instantly. It honestly felt like a completely different experience, and it was very pleasant to use.

 

Cons

While a dedicated hardware setup is much faster than the cloud hosted environments we normally use it has some important drawbacks.

  1. It’s more work to get set up.
    • You must create an Azure AD app registration yourself in order to get the client to work
  2. Less frequent updates
    • Microsoft develops the Cloud Hosted environments first, and afterwards the on-premise images
    • For instance: At time of writing .25 is already available to deploy in CHE’s. The on-premise VHD is still .24
  3. Sometimes they contain bugs that CHE’s don’t.
  4. Certain features are not available.
    • e. PowerBI, Dual Write, Electronic reporting, task recorder

Conclusion

Right now the cons outweigh the pros therefore I would still not recommend the use of these VHD’s in every case.

However, if we ever reach the point where one development machine can be used for multiple customers (different code- and database) it might become very interesting to have a high performing machine to speed up development.

More relevant news