Use posix_fadvise for log files

Registered by Evgeniy Stepchenko on 2008-12-30

There is bad contention on writes in case O_DIRECT is used. (- this is a remark from 2008, not sure if still applies?)

The following MySQL/InnoDB logs should be freeed fromcache as soon as not needed:
- InnoDB redo log: immediatelly after writing if the changed page tracking / XtraBackup (possible to detect the latter?) is not running. If changed page tracking is running, release after reading the log block. If XtraBackup is running, release from XtraBackup. The combination of changed page tracking and XB should ideally release the log from whoever is the last reader, but that might be impossible to detect.
- Binary log on the master after it has been shipped to the slave(s).
- Binary log on the slave after it has been executed and optionally shipped to further slave(s).

The call would be posix_fadvise(FADV_DONTNEED).

Ref
http://cdn.oreillystatic.com/en/assets/1/event/56/Linux%20and%20H_W%20optimizations%20for%20MySQL%20Presentation.pdf
https://github.com/yoshinorim/unmap_mysql_logs

Blueprint information

Status:
Not started
Approver:
None
Priority:
Medium
Drafter:
Laurynas Biveinis
Direction:
Approved
Assignee:
None
Definition:
Drafting
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.