// mysql · disk i/o

innodb_write_io_threads

Background threads for InnoDB write I/O.

默认
4
Range
1 to 64
Restart needed
是
Default checked on
MySQL 8.4 LTS

作用

Writes are mostly issued by page cleaner threads through these I/O threads.

默认值

4. 4 (MySQL 8.4).

Check the current value

SHOW GLOBAL VARIABLES LIKE 'innodb_write_io_threads';

SELECT VARIABLE_NAME, VARIABLE_SOURCE, MIN_VALUE, MAX_VALUE, SET_TIME
FROM performance_schema.variables_info
WHERE VARIABLE_NAME = 'innodb_write_io_threads';

Change it

SET PERSIST_ONLY innodb_write_io_threads = 8;
-- then restart mysqld (or set it under [mysqld] in my.cnf)

Restart required: the variable is read-only at runtime (SET GLOBAL fails with error 1238). Stage it with SET PERSIST_ONLY or under [mysqld] in my.cnf.

When to change it

Rarely; prefer raising innodb_page_cleaners or innodb_io_capacity when flushing lags.

What can go wrong

Low.

Questions about innodb_write_io_threads

What is the default value of innodb_write_io_threads in MySQL?

4. 4 (MySQL 8.4).

Does changing innodb_write_io_threads require a restart?

Yes. Restart required: the variable is read-only at runtime (SET GLOBAL fails with error 1238). Stage it with SET PERSIST_ONLY or under [mysqld] in my.cnf.

When should I change innodb_write_io_threads?

Rarely; prefer raising innodb_page_cleaners or innodb_io_capacity when flushing lags.

Back to all MySQL settings, or check the MySQL manual for every option.

// one client for every engine

Check innodb_write_io_threads on your own server

SQLly runs the query above against MySQL and the other engines in this reference, from one desktop app on macOS, Windows and Linux.