All Products
Search
Document Center

ApsaraDB RDS:16K atomic write

Last Updated:Mar 28, 2026

16K atomic write boosts write performance on ApsaraDB RDS for MySQL by at least 40% — with no additional cost. It works by giving InnoDB a hardware-level guarantee that every 16 KB data page write is atomic, making the doublewrite mechanism unnecessary.

How it works

MySQL's InnoDB engine reads and writes data in 16 KB pages, but most file systems write in 4 KB blocks. Without extra protection, a power outage mid-write can leave a page partially written — a condition InnoDB cannot recover from on its own.

InnoDB's traditional fix is the doublewrite mechanism: write each dirty page to the doublewrite buffer first, then flush it to its actual location. This makes every flush two write operations instead of one, nearly doubling the write I/O load.

16K atomic write takes a different approach. Instead of writing each page twice, it asks the underlying storage to guarantee that any 16 KB write either completes in full or not at all. With that guarantee in place, the doublewrite buffer adds no safety value — so innodb_doublewrite is disabled, cutting write I/O in half.

Prerequisites

Before you begin, ensure that you have:

  • An RDS instance running MySQL 5.7 or MySQL 8.0

  • Storage type: standard SSDs or Premium ESSDs

Billing

16K atomic write is free. There is no charge for enabling or disabling it.

Usage notes

  • Instance restart required: The instance restarts when you enable or disable 16K atomic write. Plan for downtime before making changes.

  • Primary and read-only instances are linked: If 16K atomic write is enabled on the primary instance, it cannot be disabled on read-only instances. Disabling it only on the read-only side would create a performance mismatch that causes replication delay.

  • Configuration is inherited: Read-only instances and instances restored from backup inherit the 16K atomic write setting from the source instance.

Enable or disable 16K atomic write

Important

Instances that meet the prerequisites and the following conditions have 16K atomic write enabled by default:

  • New instances: Purchased from the ApsaraDB RDS console on or after May 14, 2025.

  • Existing YiTian RDS instances: Instances whose product type has not been changed. Existing standard instances do not support 16K atomic write.

  1. Open the ApsaraDB RDS instance list, select a region, and click the target instance ID.

  2. On the Basic Information page, click the 16K atomic write switch to enable or disable the feature.

Performance testing

The following results were measured using Sysbench oltp_write_only on High-availability Edition instances with Premium ESSDs, comparing QPS before and after enabling 16K atomic write.

Test setup

Test instances

EditionStorage typeInstance familyInstance typeSpecs
High-availabilityPremium ESSDGeneral-purposemysql.n2.large.2c4 cores, 8 GB
High-availabilityPremium ESSDDedicatedmysql.x2.large.2c4 cores, 8 GB

Test data: 300 GB across 30 tables, 40 million rows each.

Install Sysbench (CentOS example):

git clone https://github.com/akopytov/sysbench.git
cd sysbench
git checkout 0.5

yum -y install make automake libtool pkgconfig libaio-devel
yum -y install mariadb-devel

./autogen.sh
./configure
make -j
make install

Prepare test data:

sysbench oltp_write_only --tables=30 --table_size=40000000 --rand-type=special --rand-spec-pct=15 --threads=64 --time=100 prepare

Test parameters

ParameterValueDescription
tables30Number of tables
table_size40,000,000Rows per table
rand-typespecialRandom number distribution
rand-spec-pct15Percentage treated as special values
threads64Concurrent threads
time100Test duration (seconds)

Run the test

sysbench oltp_write_only --tables=30 --table_size=40000000 --rand-type=special --rand-spec-pct=15 --threads=64 --time=100 run

Test results

16K atomic write

  • General-purpose instance (4 cores, 8 GB): QPS increased by 48% after enabling 16K atomic write (orange).

    image

  • Dedicated instance (4 cores, 8 GB): QPS increased by 47% after enabling 16K atomic write (orange).

    image

16K atomic write + Buffer Pool Extension (BPE)

For details on the Buffer Pool Extension (BPE) feature for Premium ESSDs, see Use the I/O acceleration feature of general ESSDs.
  • General-purpose instance (4 cores, 8 GB): QPS increased by 93% after enabling both 16K atomic write and BPE (orange).

    image

What's next

References