Burstable MySQL flexible server is not accumulating credits

Thomas 0 Reputation points
2024-05-18T21:43:02.2166667+00:00

Hello,

I have burstable MySQL flexible server, without any activity, but the credits are not accumulating and still dropping down to 0 after some time.

I have Azure Database for MySQL flexible server, Standard_B1s. The database is very small (~1000 rows in sum) and it is not used for last many days. The problem is that in Metrics CPU Credits Remaining dropped to 0, even that there is no activity from my side.

I enabled audit logging on MySQL (all options) to be sure there is really no activity. There is some activity during the night due to automatic backup. But then since 3 AM for instance there is no SQL activity based on Logs.

The issue is probably CPU (in Metrics Host CPU Percent), which is between 10-30 most of the time. Sometimes, even for few hours, the Host CPU Percent was 100%. As I mentioned, there was no activity on the database from my side at that time, also no SQL activity based on the Logs.

I tried to change the server to more expensive one and then back again. I got new 30 credits and for a day or so the credits were still around 20-40 (even that I would expect the credits go high). But then the credits started going down again. CPU was 10-30 the whole time. As I mentioned, there was no SQL activity from my side the whole time. I tried restart the server, but the result was the same - I got 30 credits, which were gone again after a day or so.

Could someone please help how to investigate the root cause here?

Thank you.

Thomas

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
729 questions
{count} votes

1 answer

Sort by: Most helpful
  1. hossein jalilian 4,385 Reputation points
    2024-05-18T22:03:20.3366667+00:00

    Hello Thomas,

    Thanks for posting your question in the Microsoft Q&A forum.

    It seems that your Azure Database for MySQL Flexible Server is experiencing high CPU utilization, leading to the depletion of CPU credits even when there is no apparent activity from your application.

    • Azure Database for MySQL performs automatic maintenance operations, such as backups, replication, and other housekeeping tasks, which can consume CPU resources . check the timing of these operations and see if they correlate with the periods of high CPU usage and credit depletion
    • Even if there is no apparent activity from your application, there could be long-running queries or inefficient queries executing in the background, causing high CPU utilization. use the SHOW PROCESSLIST command to check for any long-running queries or processes.
    • Review your database configuration parameters, such as innodb_buffer_pool_size, max_connections, and others, to ensure they are optimized for your workload . suboptimal configuration settings can lead to inefficient resource utilization and high CPU usage.

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful