Incident Library

IL-0447 every · 2024-06-24 (published)databaseaws

An every RDS for MySQL instance slowed badly when its gp2 EBS BurstBalance ran out and IOPS fell to the baseline

The BurstBalance drain came mainly from higher WriteIOPS, and the team found a query that used a lot of I/O. It was a complex SELECT whose I/O jumped while it ran; its execution plan showed Using temporary, Using filesort in Extra, meaning an internal sort and writes to a temporary table. The team concluded that these temporary table writes used up the BurstBalance, after which the 30GiB gp2 volume was limited to its 100 IOPS baseline.

Why the query suddenly began writing so much to temporary tables was still under investigation when the article was written. One possibility the team gives is that the temporary tables grew with the accumulating data until they passed the limit for in-memory processing and spilled to disk. The article lists possible countermeasures: tuning the query by reviewing indexes or rewriting it, moving from gp2 to gp3 or enlarging the storage, adjusting tmp_table_size and max_heap_table_size, a larger instance type, and monitoring BurstBalance with CloudWatch alerts and the service with external monitoring such as Pingdom.

Severity
–
Scope
Performance of one RDS for MySQL database dropped sharply
Users affected
–
Region
–
Time to detect
–
Time to resolve
–

Symptoms

The BurstBalance of an RDS instance began to fall rapidly and finally ran out, and the database's performance dropped sharply. The instance ran MySQL 5.7.44 on db.t3.medium with general purpose SSD (gp2) storage of 30GiB.

On gp2 volumes, BurstBalance is the remaining credit for running above the baseline IOPS. The baseline is 3 IOPS/GB with a minimum of 100 IOPS, bursts go up to 3,000 IOPS, and the maximum credit is 5.4 million I/O credits. When BurstBalance is empty, IOPS is held to the baseline: for this 30GiB volume, 3 IOPS/GB gives 90 IOPS, so the minimum of 100 IOPS applied.

The team checked the CloudWatch metrics BurstBalance, ReadIOPS and WriteIOPS, the RDS error log and the slow query log, and used Performance Insights to find the queries at fault and read their execution plans. BurstBalance fell as WriteIOPS rose. At an assumed hourly average of 600 WriteIOPS, the balance would be used up in about 3 hours.

Symptom Database overloadThroughput degradation

Root cause

Trigger
A complex SELECT query began writing large amounts of data to temporary tables, which raised WriteIOPS and used up the burst credits.

Detection

–

Remediation

–

Action items

Lessons

A complex query can have a large effect on I/O, so database design and queries need continuous improvement, and query performance needs regular monitoring.

Sources

Related cases

Check your cluster for this

kubegap audits a Kubernetes cluster for conditions like the ones in this case, Database, Cloud block storage among them, read-only, from Claude Code or Codex. Its checks cite public reports like this one.

For AI tools and scripts

The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.