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 11-13K qps to 15-16 qps), and D:\$Log writes are now gone.

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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: