Bug #107523 Unclear interaction between `innodb_use_native_aio` and many other parameters
Submitted: 9 Jun 2022 8:50 Modified: 9 Jun 2022 12:10
Reporter: haochen he Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Documentation Severity:S4 (Feature request)
Version:8.0 OS:Linux
Assigned to: CPU Architecture:Any

[9 Jun 2022 8:50] haochen he
Description:
## Documentation:

  "With native AIO, query threads dispatch I/O requests directly to the operating system, thereby removing the limit imposed by the number of background threads. InnoDB background threads wait for I/O events to signal completed requests. When a request is completed, a background thread calls an I/O completion routine and resumes waiting for I/O events."

 -- https://dev.mysql.com/doc/refman/8.0/en/innodb-linux-native-aio.html 

  "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 that InnoDB background threads service these types of I/O requests."

 -- https://dev.mysql.com/doc/refman/8.0/en/innodb-performance-multiple_io_threads.html

## Problem:

(1) I think these paragraphs imply that when setting innodb_use_native_aio=1, the number of threads that issue I/O may not be controlled by innodb_read_io_threads or innodb_write_io_threads. But there are not documented by  https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_write_io_thre...

(2) If my understanding of (1) is not correct, then how innodb_write_io_threads/innodb_read_io_threads may influence the aio threads?

(3) As documented here: "InnoDB uses the asynchronous I/O subsystem (native AIO) on Linux to perform read-ahead and write requests for data file pages." -- https://dev.mysql.com/doc/refman/8.0/en/innodb-linux-native-aio.html. According to my understanding, "data file" only includes the files that store real user data, but excluding index data, log data, doublewrite data, WAL data... But a page cleaner may also write data files (from dirty pages). So does it mean that innodb_use_native_aio will also influence how page cleaner write data? Futher, I also have the same problem with innodb_log_writer_threads.

## Unclear interactions

innodb_use_native_aio  innodb_write_io_threads/innodb_read_io_threads 
innodb_use_native_aio  innodb_page_cleaners
innodb_use_native_aio  innodb_log_writer_threads

Thanks!

How to repeat:
N/A

Suggested fix:
clarify the contents above.
[9 Jun 2022 8:51] haochen he
bug report title update.
[9 Jun 2022 12:10] MySQL Verification Team
Hi Mr. he,

Thank you for your documentation bug.

However, we do not see any problems with our Reference Manual. We must point out that that is a Reference Manual and not Users Manual. Hence, it is not written to explain every single detail of the possible interaction between different configuration variables, features etc ...... That part would belong to Users Manual.

Regarding your questions, of course that setting for the usage of the native asynchronous I/O will change the behaviour for the number of I/O read and write threads.

Next, data files in InnoDB include everything, not just data, but indices, statistics etc ..... Hence, I/O setting in InnoDB influence only data files and redo / undo logs.

That is all very simple and it does not belong to Reference Manual.