[MDEV-24037] Use NtFlushBuffersFileEx(FLUSH_FLAGS_FILE_DATA_SYNC_ONLY) , the Windows "fdatasync" Created: 2020-10-27 Updated: 2023-03-29 Resolved: 2020-11-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Windows, Storage Engine - InnoDB |
| Fix Version/s: | 10.5.7 |
| Type: | Task | Priority: | Major |
| Reporter: | Vladislav Vaintroub | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| 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. |
| Comments |
| Comment by Vladislav Vaintroub [ 2020-10-27 ] |
|
marko, could you review 24c7a3823fb11ecc2305f6b3091f7b8c0da73465 ? |