Dynamics 365 Business Central 2024 Wave 1. What’s New in Performance.

Every version, same story: the fastest.

And this could be once more the fastest of its species (read it, fastest version in SaaS overall and fastest since Dynamics 365 Business Central 2019 Wave 2 – v15 -).

I have squeezed out the main performance goodies included in Dynamics 365 Business Central 2024 Wave 1 (v24). Mostly they are coming from server runtime team, ‘course (bravo to all of them). And in my favourite order (my blog, my rules).

  1. Faster OData loading
  2. Improved NumberSequence
  3. NST now runs on .NET 8
  4. Per-User queues for incoming web services.
  5. (On-Prem) AlterKey

BONUS TRACK : Torben is back!

Faster OData loading

Ah. That is talking. Is this just a refinement? Should I care about that? Well, if you are on-premises, probably you might – or you already – have inflated $$$ in your environment to cope with very high-volume incoming Web Services. Good (or bad) for you.

SaaS resources are under Microsoft administration and, as of now, you cannot increase your throughput in any type of resource, like having a higher database eDTUs. Stated that: every single unit of performance improvements count.

In this case, considering high-volume of calls (typically APIs – one of the typical performance silent killer – with standard and/or custom integrations), like the one shown below, and that reflects a single environment with No. of calls per minute,

changes like this, have a discrete impact in the database usage landscape.

It is trivial to say that it is a mutual benefit: customers have better performance in their integration and Microsoft avoid upscaling production database frequently to a more costly tier (and, overall, avoid email or social network buzz).

Improved NumberSequence

When I am doing application setup reviews in relation to performance, one train stop is the No. Series. Are you using “Allow gaps in No.” for all the non-fiscal ones? No?

< silence >

What I was saying? Ah Yes. Allow gaps in No. If you want to know the advantages, this is the milestone official reference dated back 4 years (and several releases) ago:

https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-number-sequences

Since it popped up – deo gratias (it is Latin) – assigning a number to an entity that allows gaps in the sequencing number (a discrete number of them), it reduced the drastical locking impact it had in the old Dynamics NAV days. And if you have not uptake that, yet, then please go do.

BUT if this feature was so good, then why these changes / enhancements?

Honestly, I know the discrepancy between SQL Server and Azure SQL with high-volume assignments since a while now. If you don’t, then please read these blog posts and once again understand the importance of the repro environment

Performance of Number Series and Number Sequence. (vld-nav.com)

Number series and Number Sequence in Cloud (vld-nav.com)

That are practical applications from this SQL Server blog post, dated back 10+ years ago:

Sequence vs Identity – Performance Comparison – byoBI.com (wordpress.com)

With Dynamics 365 Business Central 2024 Wave 1 (version 24), product group finally investigate it and make it faster as it deserved in the NumberSequence API handling.

Personally, I am still waiting Microsoft to open for CACHE property in the API to read (most of) them in-memory. What I think – me myself and I – that is preventing Microsoft from using this parameter is mostly with on-premises, where you could restart SQL Server service at will and flushing in-memory values away. If this happens frequently, and using a high CACHE value, then you will probably be out of numbers quickly for your NumberSequence object.

If this is the reason – I do not know, just thinking aloud – why not adding CACHE parameter in the AL API (CreateSequence) to be exclusive SaaS-only? Obviously limited to a MaxValue to avoid reaching out the limit in a short time.

NST and .NET 8

Yes, yes. If I could have a beer for every version of anything being the fastest, I could open my own pub firm -. To give you an example of what I mean, check out this blog post: Announcing .NET 6 – The Fastest .NET Yet – .NET Blog (microsoft.com)

The truth is that deploying the latest and greatest .NET version takes two birds with a stone: compliancy (support lifecycle and security – these are the main reasons -) and then performances.

Anyway, now that we are jumping from .NET 6 to .NET 8, there might be more robust and few performance enhancements there in the bits, altough not that much emphasized.

If you want to read a bit more about these, below a couple of in-depth official blog posts

Performance Improvements in .NET 7 – .NET Blog (microsoft.com)

Performance Improvements in .NET 8 – .NET Blog (microsoft.com)

.NET 8 Performance Edition (steven-giesel.com)

(SaaS) Per-User queues for incoming WS

To have a better experience, instead of receiving the typical “hey you! Stay there! You have been throttled!” (HTTP 429) and the need of handle it accordingly, now it is possible to create multiple app registration and associate them with more relevant S2S users within the same business central environment.

Yet another resource governance on a per-user basis.

I hope this could be also done not only for Web Services, Scheduled Tasks, frequency of API calls (these last two were changed in the previous version) but also for database tiers and even entire environment. And I believe I am not the only one who talked with customers willing to pay more for increased (even dedicated) resources. If you are one these then give me your finger, we are brother. …But that is another story.

(On-Prem) AlterKey

I was (strongly) expecting the capability of enabling / disabling indexes at will in this major release for SaaS, since it was popping up for a coule of days in the previous release announcement (v23), and then it was suddenly removed.

But this proof I was wrong. And still we have to patiently wait to have more (and better) control over I/O, in relation of index usage. And what I was expecting together with more control on SQL indexes, it is a page that shows up the index usage (index reads / index writes) in order to make educated decisions.  

What has been implemented so far, it is already showcased by a guy that I know here: Dynamics 365 Business Central: introducing the new Table Key module – Stefano Demiliani

If you read it carefully until the end, to keep it shorts, you might have noticed that this feature usage is still limited:

  1. It is only possible within a single transaction.
  2. It is an On-Premises only feature (for the moment).

I can think of some on-premises real life scenarios in the application where this could be beneficial:

  • Every time you need to do a non-filtered DELETEALL AND you know that there are A LOT of data. This reduces scenarios to a typical not-diligent control of the environment (you do not look at Table Information so often, aren’t you?).
  • Every time you need to force an index rebuild, in order to reduce fragmentation and/or fully update statistics.

Yes. If you disable a SQL index and then re-enable it again, this will rebuild the index. ATTENZIONE! (it’s italian, means WARNING!) be sure to have the right fill factor on that index. Just few official notes on this:

Specify Fill Factor for an Index – SQL Server | Microsoft Learn

Maintaining indexes optimally to improve performance and reduce resource utilization – SQL Server | Microsoft Learn

That is totally fine BUT if I (and I am sure also you do) need to rebuild indexes or update statistics ON-PREMISES then you do not perform this task through AL but you have your own rebuild indexes and update statistics scripts, running at the desired frequency in your maintenance plan.

The same applies to scenarios where you need to delete A LOT of data, like in the typical Change Log Entry case. I do not think that you write anything in AL, but you go directly to sql server and use a super easy and fast TRUNCATE table. One line of T-SQL and all records will disappear in a blink of an eye.

I see AlterKey having more practical use cases in the online version, where you have no control over backend. But I assume we have to wait for that (just a little bit).

BONUS TRACK : Torben is back!

I had the pleasure to work with Torben Wind Meyhoff in my previous professional life and when I heard he was coming back to its first love, I said a big aloud YES!.

That is a really super additon to the Dynamics 365 Business Central Product Group.

You might scratch your head asking “Why such credit in a blog post”? Because quite a few of performance improvements in the runtime in the past, I strongly believe they pass-through this goodfella. Once again: thanks Torben and welcome back.

2 thoughts on “Dynamics 365 Business Central 2024 Wave 1. What’s New in Performance.

Add yours

  1. “Honestly, I know the discrepancy between on-premises and SaaS with high-volume assignments since a while now.”
    Can we please stop saying OnPrem vs Saas without specifying what we actually mean/assume and adress the real source of problem. It is Azure SQL that has slower number sequence.
    Almost all our OnPrem customers run OnPrem BC server but Azure SQL hence why I’m getting tires of this Onprem vs Saas simplification 😉

    Like

Leave a comment

Blog at WordPress.com.

Up ↑