MariaDB

Doublewrite Buffer Write Amplification

warning
Resource ContentionUpdated Jun 8, 2023

InnoDB's doublewrite buffer causes additional write operations that can saturate provisioned IOPS and increase latency. Each 16KB page write to data files requires a prior write to the doublewrite buffer, creating overhead that scales with write-heavy workloads.

How to detect:

Monitor the ratio of innodb_dblwr_writes to innodb_data_writes. High write IOPS consumption with elevated innodb_dblwr_writes and WriteLatency indicates doublewrite buffer overhead. If WriteLatency rises while approaching IOPS limits, and innodb_dblwr_writes is significant, the doublewrite buffer may be the bottleneck.

Recommended action:

If running on RDS for MySQL 8.0.30+ or MariaDB 10.6.10+ on supported Nitro instance classes, enable RDS Optimized Writes by setting rds.optimized_writes=AUTO. This disables the doublewrite buffer by providing torn-write protection at the hardware layer. For older versions or unsupported instances, increase provisioned IOPS, optimize queries to reduce write volume, or upgrade to a supported configuration.