Azure - are there minimum increments for B Series CPU credits? A threshold?

Matthew Mckenzie 5 Reputation points
2025-01-29T18:20:53.55+00:00

We have a B20ms "Flexible Server for Postgres" that has been running under a light load for several weeks. It has significant CPU credit of around 5,450. Periodically, the CPU has risen above 10% and the CPU credit has drained slightly at times in a staircase fashion. Small steps.

When the CPU sits at 0.5%(!) for four hours or more, this does not seem to replenish. I would expect credit to increase below the line at the same rate and in similar increments to draining.

Is there more to the algorithm than is publicly stated? I might expect there are quanta involved for step down and step up? But I also expect this to return to a ceiling over a week. Is this jut not going to happen unless we resize or stop the database?

User's image

User's image

Longer term, note zooming to scale.

User's image

CPU is largely below 5% and frequently below 1% for hours at a time.

User's image Asking in case there have been similar observations, this may not be a popular SKU. In addition, although we rely upon Azure documentation , the delivery sometimes does not match the promise.

Azure Database for PostgreSQL
{count} votes

2 answers

Sort by: Most helpful
  1. Mahesh Kurva 2,670 Reputation points Microsoft Vendor
    2025-01-30T23:05:32.2633333+00:00

    Hi @Matthew Mckenzie,

    Welcome to Microsoft Q&A forum.

    As I understand it, you're experiencing unexpected behavior with the CPU credit replenishment on your B20ms 'Flexible Server for Postgres.' The CPU credit system for burstable VMs, such as the B-series, is designed to accumulate credits when CPU usage is below a certain threshold and consume them when usage exceeds that threshold.

    However, there are a few important details to consider:

    1.The rate at which credits accumulate can vary based on the specific VM size and the base performance level. For B20ms, the accumulation might not be linear and could involve certain quanta or steps.

    2.When the CPU usage spikes above the base level, credits are consumed. This consumption can appear in small steps, as you've observed.

    3.If the CPU usage remains consistently low (e.g., 0.5% for extended periods), the credits should ideally replenish. However, there might be a minimum threshold or quanta involved in the replenishment process that isn't explicitly documented.

    4.Over a longer period, if the CPU usage is predominantly low, the credits should eventually return to a higher level. If this isn't happening, it might be worth investigating further with Azure support to ensure there isn't an underlying issue.

    For more information, please refer the documents:

    https://techcommunity.microsoft.com/blog/adforpostgresql/march-2023-recap-azure-database-for-postgresql-flexible-server/3793769

    https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-compute

    Hope this helps. Do let us know if you any further queries.

     If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


  2. Matthew Mckenzie 5 Reputation points
    2025-02-03T22:31:57.0366667+00:00

    Further information, that may qualify as an answer in time,

    According to https://www.apptio.com/blog/b-series-vs-dv3-series-how-to-choose-the-right-azure-vm-instance/ the B20ms has

    • a baseline of 337% (÷20 = 16.85%)
    • max performance of 2000%
    • initial credits of 600
    • 203 banked credits per hour (checks out)
    • max banked credits of 4860

    User's image

    Soooo... On launch you get 600 credits, once off. Plus 4860 took us to 5460.
    I imagine we cannot bank credits until we drop below 4860. This is theory, burning 10 per day that is a few months. I am loathe to deliberately stress it to test.

    Disclaimer : These numbers are not published anywhere by Azure, and seem to have been leaked to selective partners, and are of course subject to change, as is the offering.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.