Torn write prevention on Amazon EC2 Linux instances
Note
Torn write prevention is supported with Linux instances only.
Torn write prevention is a block storage feature designed by Amazon to improve the performance of your I/O-intensive relational database workloads and reduce latency without negatively impacting data resiliency. Relational databases that use InnoDB or XtraDB as the database engine, such as MySQL and MariaDB, will benefit from torn write prevention.
Typically, relational databases that use pages larger than the power fail
atomicity of the storage device use data logging mechanisms
to protect against torn writes. MariaDB and MySQL use a doublewrite buffer
file to log data before writing it to data tables. In the event of incomplete or torn writes,
as a result of operating system crashes or power loss during write transactions, the database
can recover the data from the doublewrite buffer. The additional I/O overhead associated with
writing to the doublewrite buffer impacts database performance and application latency, and it
reduces the number transactions that can be processed per second. For more information about
doublewrite buffer, see the
MariaDB
With torn write prevention, data is written to storage in all-or-nothing write transactions, which eliminates the need for using the doublewrite buffer. This prevents partial, or torn, data from being written to storage in the event of operating system crashes or power loss during write transactions. The number of transactions processed per second can be increased by up to 30 percent, and write latency can be decreased by up to 50 percent, without compromising the resiliency of your workloads.
Pricing
There are no additional costs for using torn write prevention.