Details
-
Task
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
Description
Starting with MDEV-28766 in 10.8, O_DIRECT can be enabled on the redo log:
SET GLOBAL innodb_log_file_buffering=OFF; |
The parameter innodb_flush_method is confusing and could not be set without restarting the server. Its allowed values are as follows:
- fsync (0, SRV_FSYNC): the default before
MDEV-24854: use file system cache and explicit fdatasync() or fsync() - O_DSYNC (1, SRV_O_DSYNC): O_DIRECT on data files, and enable O_DSYNC on the redo log
- littlesync (2, SRV_LITTLESYNC): like O_DIRECT_NO_FSYNC, but using the file system cache (unsafe!)
- nosync (3, SRV_NOSYNC): like littlesync, but do not invoke fsync() or fdatasync() on the log file
- O_DIRECT (4, SRV_O_DIRECT): like fsync but bypassing the file system cache for data files (default)
- O_DIRECT_NO_FSYNC (5, SRV_O_DIRECT_NO_FSYNC): like O_DIRECT, but do not call fsync() or fdatasync() on the data files (unsafe in some cases; see this comment in MDEV-24854)
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:
- innodb_log_file_buffering (disable O_DIRECT, added by
MDEV-28766in 10.8.4, 10.9.2) - innodb_data_file_buffering (disable O_DIRECT on data files)
- innodb_log_file_write_through (enable O_DSYNC on the log)
- innodb_data_file_write_through (enable O_DSYNC on persistent data files)
3 of the above 4 Boolean parameters would be added in this task.
Attachments
Issue Links
- causes
-
MDEV-30447 storage/innobase/os/os0file.cc:1028:58: error: use of undeclared identifier 'O_DIRECT'
- Closed
-
MDEV-33203 storage/innobase/os/os0file.cc doesn't compile on Solaris
- Closed
- relates to
-
MDEV-30054 debug-no-sync doesnt fully disable sync calls
- Closed
-
MDEV-30506 Port innodb_{log,data}_file_{buffering,write_through} usage to MariaBackup
- Open
-
MDEV-32357 Make innodb_flush_method dynamic
- Closed
-
MDEV-33379 innodb_log_file_buffering=OFF causes corruption on bcachefs
- Closed
-
MDEV-24854 Change innodb_flush_method=O_DIRECT by default
- Closed
-
MDEV-28766 MDEV-28111 breaks innodb_flush_log_at_trx_commit=2
- Closed
-
MDEV-28909 Write performance not scale to NVMe SSD
- Stalled
-
MDEV-30507 Document in KB innodb_{log,data}_file_{buffering,write_through}
- Closed
-
MDEV-33095 innodb_flush_method=O_DIRECT creates excessive errors on Solaris
- Closed
-
MDEV-33545 Perf regression from removing innodb_flush_method=O_DIRECT_NO_FSYNC
- Closed
-
MDEV-33894 MariaDB does unexpected storage read IO for the redo log
- Closed