[MDEV-21382] use fdatasync() for redo log where appropriate Created: 2019-12-22 Updated: 2021-12-23 Resolved: 2020-01-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Fix Version/s: | 10.5.1 |
| Type: | Task | Priority: | Major |
| Reporter: | Eugene Kosov (Inactive) | Assignee: | Eugene Kosov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| 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. |
| Comments |
| Comment by Marko Mäkelä [ 2019-12-23 ] |
|
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. |