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

Use NtFlushBuffersFileEx(FLUSH_FLAGS_FILE_DATA_SYNC_ONLY) , the Windows "fdatasync"

    XMLWordPrintable

Details

    Description

      Found during recent benchmarking

      On relatively weak SSD, with usual (on Windows), non-buffered IO, I noticed that from 20-60MB/s writes on the disk during the benchmark, about 7MB/s goes into file D:\$Log (NTFS).

      Apparently, file metadata changes are stored there, such as file update times.

      Using NtFlushBuffersFileEx with FLUSH_FLAGS_FILE_DATA_SYNC_ONLY improves performance significantly (from 11K-13K qps to 15K-16K qps), and D:\$Log writes are now gone.

      I conclude we should switch to using this function on Windows.

      Attachments

        Issue Links

          Activity

            People

              wlad Vladislav Vaintroub
              wlad Vladislav Vaintroub
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0.5d
                  0.5d
                  Remaining:
                  0d
                  Logged:
                  Time Not Required
                  Not Specified

                  Git Integration

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