Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21382

use fdatasync() for redo log where appropriate

Details

    Description

      Redo log files are fixed size files. They're almost never renamed. So, metadata is not changed. For such cases we can use `fdatasync()` which doesn't flush metadata, like `fsync()` does. That should bring use some performance.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä added a comment - - edited

            MDEV-14425 may introduce a format option for append-only log files. For that option, we may need to use fsync(). For the circular files, fdatasync() indeed seems sensible. Not having an up-to-date timestamps on the redo log files should not matter much.

            Edit: fdatasync() (as well as opening a file in O_DSYNC mode) does update the file size and allocation metadata. We would only need fsync() if we cared about file timestamps.

            marko Marko Mäkelä added a comment - - edited MDEV-14425 may introduce a format option for append-only log files. For that option, we may need to use fsync() . For the circular files, fdatasync() indeed seems sensible. Not having an up-to-date timestamps on the redo log files should not matter much. Edit: fdatasync() (as well as opening a file in O_DSYNC mode) does update the file size and allocation metadata. We would only need fsync() if we cared about file timestamps.

            People

              kevg Eugene Kosov (Inactive)
              kevg Eugene Kosov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.