ablog

不器用で落着きのない技術者のメモ

Aurora の IO サイズ

Read は MySQL が 16KB、PostgreSQL が 8KB、Write は MySQLPostgreSQL とも 4KB。

Each database page is 16 KB in Aurora MySQL-Compatible Edition and 8 KB in Aurora PostgreSQL-Compatible Edition.

Aurora was designed to eliminate unnecessary I/O operations in order to reduce costs and to ensure resources are available for serving read/write traffic. Write I/Os are only consumed when persisting redo log records in Aurora MySQL-Compatible Edition or write ahead log records in Aurora PostgreSQL-Compatible Edition to the storage layer for the purpose of making writes durable.

Write I/Os are counted in 4 KB units. For example, a log record that is 1024 bytes will count as one write I/O operation. However, if the log record is larger than 4 KB, more than one write I/O operation will be needed to persist it.

Modern Relational Database Service | Amazon Aurora FAQs | Amazon Web Services

At a high level, relational databases traditionally interact with block storage. On this block storage, the data is stored in blocks of rows called pages. Page size differs between database engines and even within the same database engine depending on the engine’s configuration parameters. Aurora supports a 16 KB page size for Amazon Aurora MySQL and an 8 KB page size for Amazon Aurora PostgreSQL. The page size is the smallest I/O operation that the database engine performs.

...

Although actual log records vary in size, writes to an Aurora cluster are sent in 4 KB units when possible. If the writer has several log records at the same time that are less than 4 KB in size, they’re batched together into a single write operation. For example, a 50-byte log record and 3,000-byte log record may be combined into a single write operation. Log records greater than 4 KB are split into 4 KB units.

Planning I/O in Amazon Aurora | AWS Database Blog