innodb_write_io_threads

Tuning innodb_write_io_threads variable in MySQL, Percona and MariaDB

Written By ROMAN AGABEKOV | SEP 6, 2022

Last update | FEB 19, 2026

Version Scope and Defaults

innodb_write_io_threads controls the number of background threads InnoDB uses for writing data pages to disk. Default is 4 (range 1–64), available in MySQL 5.7, 8.0/8.4/9.4, Percona Server, and MariaDB. MySQL io performance tuning is a critical aspect of database optimization, directly impacting the speed and responsiveness of your applications.

Releem automatically tunes innodb_write_io_threads and 44 other variables to improve MySQL performance. Try Releem for Free, or deepen your understanding by reading our detailed article.

innodb_write_io_threads – Usage

Innodb_write_io_threads is a variable closely related to innodb_read_io_threads. Set the number of InnoDB threads handling write operations, using innodb_write_io_threads. The innodb_read_io_threads sets the number of InnoDB threads handling read requests. These variables work with MySQL, Percona, and MariaDB.

256 I/O requests can be in a pending state for each I/O write thread. Setting innodb_write_io_threads to 4, means the system will handle 1024 concurrent asynchronous write I/O requests. InnoDB will attempt to balance the pending I/O requests across all available threads.

InnoDB I/O asynchronous subsystem is controlled by the innodb_use_native_aio variable, which is enabled by default.

Tune only on multi-core systems with fast SSD/NVMe storage; default works well for most workloads due to innodb_use_native_aio (enabled by default on Linux).​

innodb_write_io_threads – Configuration

Innodb_write_io_threads variable cannot be configured dynamically. You must set your intended value for innodb_write_io_threads using the configuration file (my.cnf or my.ini). Select a value for the number of threads between 1 and 64, with the default value being 4:

Configuration File:
 [mysqld] 
 innodb_write_io_threads = XX 
Replace XX with a value to suit your database needs. Must restart MySQL servers to see changes applied.
Verify:
SHOW VARIABLES LIKE 'innodb_write_io_threads';
Schedule during maintenance; monitor pending writes and IOPS post-change.

innodb_write_io_threads Considerations

Typically the default number of innodb_write_io_threads, 4, is highly capable of handling the I/O request load without performance degradation. InnoDB uses Linux asynchronous I/O, so each thread can handle multiple I/O requests at a time.

Most situations that require adjusting innodb_write_io_threads involve high-end I/O systems with write-intensive loads. Once the number of queued I/O requests exceeds 64, you may opt to increase the value of innodb_write_io_threads. For Linux systems running multiple MariaDB servers, you may rarely need to reduce the default value of innodb_write_io_threads, to avoid exceeding system limits.

Relation to other InnoDB I/O features

  • innodb_read_io_threads – symmetric setting for reads, usually tuned together with innodb_write_io_threads.
  • innodb_use_native_aio – enabled by default on Linux and allows each thread to handle multiple async I/Os; this is why 4 threads is often enough.​
  • Modern MySQL versions also have innodb_log_writer_threads and other background I/O paths, so simply cranking write threads to 64 rarely improves performance on its own.
Let Releem handle these configuration considerations for you.
Releem will examine your I/O pending requests and I/O usage to determine if the value of innodb_write_io_threads needs to be adjusted and apply the configuration change automatically.