How to calculate Microsoft Fabric costs – FourMoo | Power BI


I was going to update my existing blog post with regards to the fabric costs.

I was then fortunate to be contacted by David Brown from the Microsoft Fabric team who gave me additional details in terms of how to correctly calculate the fabric costs.

You can think of a CU as CPU in your computer. This is explained to when a Fabric workload is consuming CUs which is in turn consuming CPU cycles.

As per the explanation I received from David “This is like your electrical bill where you’re charged for Kilowatt hours”.

When consuming Fabric CUs, it is measures in CU seconds or CU hours. Typically, the cost calculator is showing the hourly price, and because we have a fixed number of seconds in an hour, we can then calculate the CUs per second (I will explain this later in the blog post)

So, I thought it would be good to rather create a separate blog post than which arc can explain how to calculate the fabric costs. I do hope you find this useful.

I am going to use a working example where I have bought a pay as you go Fabric F2 subscription in Australia Southeast.

I am also going to use my previous example of where I was comparing the costs for running a Dataflow Gen2 and Notebook: Microsoft Fabric – Comparing Dataflow Gen2 vs Notebook on Costs and usability – FourMoo

  • Dataflow Gen2 consumed 1,154 CUs.
  • Notebook consumed 339 CUs.

Please find the new cost calculation details below.

  1. To start with each CU is equivalent to the total amount of seconds in an hour.

    1. This means that you get 3,600 per CU.

    2. In my example for an F2 which is 2 CU’s that then means I get 7,200 CU to consume per hour.

  2. Next is to take the CU hourly cost and work out the cost per CU.

    1. In my example I have an F2 which is 2 CU’s.

    2. My F2 cost is $0.42/hour.

    3. The cost per CU hour is $0.42 / 2 = $0.21

  3. Using my example below to calculate the costs I need to look at the CU’s (And NOT the duration as I had previously explained)

  4. Dataflow cost calculation:

    1. The dataflow consumed 1,154 CU seconds or 0.32 CU hours (1,154 / 3,600)

    2. The cost for the dataflow is then $0.07 ($0.21 x 0.32 CU)

    3. The dataflow also consumes about 16% of the hourly quota (1,154 sec/ 7,200 sec (hourly CU sec))

  5. Notebook cost calculation:

    1. The notebook consumed 339 CU sec or 0.094 CU hour (339 / 3,600)

    2. The cost for the notebook is then $0.01974 ($0.21 x 0.094 CU hour)

    3. The notebook also consumes about 5% of the hourly quota (339 sec/ 7,200 sec (hourly CU))

  6. Now if I had to compare the costs of the dataflow vs the notebook it would be just over 3 x (300%) cheaper to run the notebook.

    1. This is because it costs 5% of the capacity to run the notebook vs 16% for the dataflow.

When using the cost calculator please put in your hourly price for your Fabric capacity in your region. 

Next put in how many CUs you have for your Fabric Capacity.

And then finally if you want to calculate the cost for your workload put in the CUs consumed.

When talking about Fabric costs I must include a section with regards to what happens when bursting takes place.

A way to describe this is if I had run the 2 workloads in my example (Dataflow Gen2 and Notebook), then immediately turned it off and bursting took place what would then happen?

As far as I understand it, the additional CU’s might only be reflected later the capacity has been turned off.

In this case those additional CU’s will still be charged for as they were used for the workloads.

If I did not turn off my Capacity but still left it running, I would still be charged.

This is because the if the capacity is running it will be charged.

This might not be a bad thing, in the above example for bursting if the capacity is still running, I can then use the unused portion of the capacity to pay for the additional bursting.

Thanks for reading this blog post and I hope it will help you calculate the Fabric costs!

Any comments or suggestions are welcome.



Source link

Be the first to comment

Leave a Reply

Your email address will not be published.


*