innodb_read_io_threads
Background threads for read-ahead and other InnoDB read I/O.
- 기본값
Logical CPUs / 2, minimum 4- Range
- 1 to 64
- Restart needed
- 예
- Default checked on
- MySQL 8.4 LTS
기능
With native asynchronous I/O on Linux each thread handles many requests, so few are needed.
기본값
Logical CPUs / 2, minimum 4. Half the available logical processors, at least 4, since MySQL 8.4 (a fixed 4 before).
Check the current value
SHOW GLOBAL VARIABLES LIKE 'innodb_read_io_threads'; SELECT VARIABLE_NAME, VARIABLE_SOURCE, MIN_VALUE, MAX_VALUE, SET_TIME FROM performance_schema.variables_info WHERE VARIABLE_NAME = 'innodb_read_io_threads';
Change it
SET PERSIST_ONLY innodb_read_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: the 8.4 default scales with the machine.
What can go wrong
Low.
Questions about innodb_read_io_threads
What is the default value of innodb_read_io_threads in MySQL?
Logical CPUs / 2, minimum 4. Half the available logical processors, at least 4, since MySQL 8.4 (a fixed 4 before).
Does changing innodb_read_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_read_io_threads?
Rarely: the 8.4 default scales with the machine.
Back to all MySQL settings, or check the MySQL manual for every option.
Check innodb_read_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.