Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
We have innodb_use_native_aio=ON by default since the introduction of that parameter in MariaDB 5.5. However, to really benefit from the setting, the files should be opened in O_DIRECT mode, to bypass the file system cache. In this way, the reads and writes can be submitted with DMA, using the InnoDB buffer pool directly, and no processor cycles need to be used for copying data.
The setting O_DIRECT should be equivalent to the old default innodb_flush_method=fsync in other aspects. Only the file system cache will be bypassed.
Note: innodb_flush_method=O_DIRECT in combination with a tiny innodb_buffer_pool_size may cause a significant performance regression, because we will no longer be able to take advantage of the file system cache of the operating system kernel. The InnoDB buffer pool will completely replace it. Affected users should configure innodb_flush_method=fsync.
This change will not affect Microsoft Windows. The default there is innodb_flush_method=unbuffered, which is roughly equivalent to O_DIRECT.
Attachments
Issue Links
- causes
-
MDEV-33095 innodb_flush_method=O_DIRECT creates excessive errors on Solaris
- Closed
- relates to
-
MDEV-26040 os_file_set_size() may not work on O_DIRECT files
- Closed
-
MDEV-27772 Performance regression with default configuration in 10.6
- Open
-
MDEV-28766 MDEV-28111 breaks innodb_flush_log_at_trx_commit=2
- Closed
-
MDEV-28909 Write performance not scale to NVMe SSD
- Stalled
-
MDEV-30136 Map innodb_flush_method to new settable Booleans innodb_{log,data}_file_{buffering,write_through}
- Closed
-
MDEV-30986 Slow full index scan in 10.6 vs 10.5 for the (slow) I/O-bound case
- Closed
-
MDEV-32067 InnoDB linear read ahead had better be logical
- Confirmed
-
MDEV-32357 Make innodb_flush_method dynamic
- Closed
-
MDEV-33379 innodb_log_file_buffering=OFF causes corruption on bcachefs
- Closed
-
MDEV-16526 Overhaul the InnoDB page flushing
- Closed
-
MDEV-23855 InnoDB log checkpointing causes regression for write-heavy OLTP
- Closed
-
MDEV-27900 aio returning partial reads/writes looks like InnoDB: Database page corruption on btrfs with io_uring
- Closed