Is O_DIRECT in MySQL and MariaDB really effective?

While exploring some MySQL/MariaDB configurations i encountered the O_DIRECT option related to the innodb_flush_method directive.

https://dev.mysql.com/doc/refman/8.0/en/optimizing-innodb-diskio.html

https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_flush_method

So my question was. Is O_DIRECT really effective?

In short, your answer is maybe No… unless you have Solaris, but maybe it’s untrue even there.

I’ve found a very interesting lecture about this topic. This is my favorite extract:

In conclusion I can say that Linus Torvalds is once again corrent: O_DIRECT is completely useless and shouldn’t be used.

― svetlinmladenov on O_DIRECT

So, thank you Oracle! I wasted so much time because of your phrase in this stupid presentation:

InnoDB can use direct IO on systems that support it -Linux, FreeBSD, and Solaris–innodb_flush_method= O_DIRECT

Oracle Presentation, page 15

O_DIRECT = No thanks.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Per favore, ricorda che non sono apprezzati commenti senza asd all'interno. asd