[MDEV-30136] Map innodb_flush_method to new settable Booleans innodb_{log,data}_file_{buffering,write_through} Created: 2022-11-30 Updated: 2024-02-05 Resolved: 2023-01-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Fix Version/s: | 11.0.1 |
| Type: | Task | Priority: | Blocker |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Preview_11.0, performance | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Starting with
The parameter innodb_flush_method is confusing and could not be set without restarting the server. Its allowed values are as follows:
Let us deprecate the parameter innodb_flush_method and map it to 4 Boolean parameters that can be changed with SET GLOBAL while the server is running:
3 of the above 4 Boolean parameters would be added in this task. |
| Comments |
| Comment by Marko Mäkelä [ 2022-12-07 ] | ||||||||||||||||||||||||||||||
|
The deprecated parameter innodb_flush_method will be mapped to existing or added settable Boolean parameters as follows:
⁰ innodb_log_file_buffering was added in The mark - in the cells means that there will not be any assignment to the parameter. The default values of the substituting parameters are as follows:
Previously, it was only possible to enable write-through for the log but not for the data files. There calls to fsync() or datasync() operations can be disabled by setting the parameter debug_no_sync ( | ||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-12-08 ] | ||||||||||||||||||||||||||||||
|
The SET GLOBAL logic for modifying the Boolean parameter innodb_log_file_write_through will use the same mechanism that was already tested in The logic for changing innodb_data_file_buffering and innodb_data_file_write_through is new. We invoke the function fil_space_t::reopen_all(), which will attempt to close and reopen each data file in the configured mode. Already closed files will be skipped. It could theoretically cause serious denial of service. In my tests in an extra connection that was issuing SET GLOBAL while Sysbench was preparing a server or running a workload on RAM disk or fast NVMe storage, it worked rather well. It could be a good idea to test it further with innodb_open_files=10 and a large number of tables or partitions. | ||||||||||||||||||||||||||||||
| Comment by Matthias Leich [ 2022-12-13 ] | ||||||||||||||||||||||||||||||
|
origin/bb-10.11-new-innodb-defaults c434f870a346fb11a6b5932dbdf860ed7e2d2f74 2022-12-12T10:05:22+02:00 |