ALL_O_DIRECT causes unaligned AIO/DIO
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Medium
|
Hrvoje Matijakovic | ||
5.1 |
Fix Released
|
Medium
|
Hrvoje Matijakovic | ||
5.5 |
Fix Released
|
Medium
|
Hrvoje Matijakovic |
Bug Description
Setting innodb_flush_method to ALL_O_DIRECT seems to be causing unaligned AIO/DIO.
It causes "EXT4-fs (dm-0): Unaligned AIO/DIO on inode 1439824 by mysqld; performance will be poor." in dmesg where inode 1439824 is none other than ib_logfile0.
To reproduce:
1. Set innodb_
2. Check for something along the lines of
"EXT4-fs (dm-0): Unaligned AIO/DIO on inode 1442673 by mysqld; performance will be poor."
in dmesg.
Now, this dmesg message is from http://
Since this message appears only on ALL_O_DIRECT and not on O_DIRECT, it looks like somewhere in log flushing/write code there must be unaligned access (aligned I/O is a must for direct-io).
Related branches
- Laurynas Biveinis (community): Approve
-
Diff: 159 lines (+58/-6)7 files modifieddoc/source/flexibility/mysqldump_ignore_create_error.rst (+22/-0)
doc/source/flexibility/replication_skip_single_statement.rst (+1/-1)
doc/source/index.rst (+1/-0)
doc/source/management/sql_no_fcache.rst (+29/-1)
doc/source/performance/innodb_doublewrite_path.rst (+2/-2)
doc/source/release-notes/Percona-Server-5.1.67-14.3.rst (+1/-1)
doc/source/scalability/innodb_io.rst (+2/-1)
- Laurynas Biveinis (community): Approve
-
Diff: 371 lines (+26/-124)6 files modifieddoc/source/flexibility/mysqldump_ignore_create_error.rst (+22/-0)
doc/source/index.rst (+1/-0)
doc/source/management/sql_no_fcache.rst (+0/-34)
doc/source/performance/innodb_doublewrite_path.rst (+0/-87)
doc/source/release-notes/Percona-Server-5.5.29-29.4.rst (+1/-1)
doc/source/scalability/innodb_io_55.rst (+2/-2)
Wasn't that hard to diagnose after checking log_group_write_buf that writes are aligned wrt. OS_FILE_ LOG_BLOCK_ SIZE. This block size is tunable only in Percona server with innodb- log-block- size.
So, the 'fix' is quite simply setting innodb-block-size to 4096.
4096 because it is the default log-block-size in ext4 and xfs.