The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



"Стабильный выпуск СУБД MariaDB 10.6"
Версия для распечатки Пред. тема | След. тема
Форум Разговоры, обсуждение новостей
Исходное сообщение [ Отслеживать ]
Подсказка: Для сортировки сообщений в нити по дате нажмите "Сортировка по времени, UBB".
. "Стабильный выпуск СУБД MariaDB 10.6" +/
Сообщение от Профессор (?), 11-Июл-21, 17:11 
Да нет, это ты дурик. В innodb fsync используется потому, что некоторые файловые системы типа XFS не могут в direct io.

https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.ht...
```
O_DIRECT_NO_FSYNC: InnoDB uses O_DIRECT during flushing I/O, but skips the fsync() system call afterward. This setting is suitable for some types of file systems but not others. For example, it is not suitable for XFS. If you are not sure whether the file system you use requires an fsync(), for example to preserve all file metadata, use O_DIRECT instead. This option was introduced in MySQL 5.6.7 (Bug #11754304, Bug #45892).
```

https://bugs.mysql.com/bug.php?id=45892
```
Some testing by Domas has shown that some filesystems (XFS) do not sync metadata without the fsync. If the metadata would change, then you need to still use fsync (or O_SYNC for file open).

For example, if a file grows while O_DIRECT is enabled it will still write to the new part of the file, however since the metadata doesn't reflect the new size of the file the tail portion can be lost in the event of a crash.

Solution:

Continue to use fsync when important metadata changes or use O_SYNC in addition to O_DIRECT.
```

Т.е. оказывается, что в итоге в innodb используется direct io и fsync в качестве дополнения для XFS из-за кривизны XFS. Вот поэтому любая нормальная СУРБД и не использует файловые системы от ОС, а использует raw диск на котором сама управляет.

Ответить | Правка | Наверх | Cообщить модератору

Оглавление
Стабильный выпуск СУБД MariaDB 10.6, opennews, 09-Июл-21, 10:08  [смотреть все]
Форумы | Темы | Пред. тема | След. тема



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру