Documentation Home
MySQL 9.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.0Mb
PDF (A4) - 40.1Mb
Man Pages (TGZ) - 259.0Kb
Man Pages (Zip) - 366.2Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 9.0 Reference Manual  / ...  / The InnoDB Storage Engine  / InnoDB Configuration  /  Configuring the Number of Background InnoDB I/O Threads

17.8.5 Configuring the Number of Background InnoDB I/O Threads

InnoDB uses backgroundthreads to service various types of I/O requests. You can configure the number of background threads that service read and write I/O on data pages using theinnodb_read_io_threads andinnodb_write_io_threads configuration parameters. These parameters signify the number of background threads used for read and write requests, respectively. They are effective on all supported platforms. You can set values for these parameters in the MySQL option file (my.cnf ormy.ini); you cannot change values dynamically. The default value forinnodb_read_io_threads is the number of available logical processors on the system divided by 2, with a minimum default value of4. The default value forinnodb_write_io_threads is 4. The permissible values range from1-64 for both options.

The purpose of these configuration options to makeInnoDB more scalable on high end systems. Each background thread can handle up to 256 pending I/O requests. A major source of background I/O isread-ahead requests.InnoDB tries to balance the load of incoming requests in such way that most background threads share work equally.InnoDB also attempts to allocate read requests from the same extent to the same thread, to increase the chances of coalescing the requests. If you have a high end I/O subsystem and you see more than 64 ×innodb_read_io_threads pending read requests inSHOW ENGINE INNODB STATUS output, you might improve performance by increasing the value ofinnodb_read_io_threads.

On Linux systems,InnoDB uses the asynchronous I/O subsystem by default to perform read-ahead and write requests for data file pages, which changes the way thatInnoDB background threads service these types of I/O requests. For more information, seeSection 17.8.6, “Using Asynchronous I/O on Linux”.

For more information aboutInnoDB I/O performance, seeSection 10.5.8, “Optimizing InnoDB Disk I/O”.