[MDEV-12226] Avoid writes of freed (garbage) pages to InnoDB data files Created: 2017-03-10 Updated: 2020-05-04 Resolved: 2020-04-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2.2 |
| Fix Version/s: | 10.5.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | performance, temporary | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
The flushing of the InnoDB temporary tablespace is unnecessarily tied to the write-ahead redo logging and the flushing of the persistent tablespaces. This task is one step towards that goal: When a page in a temporary tablespace is marked as free, we should remove the page from the flush list. This will avoid unnecessary writes of garbage that is certainly not needed any more. (The freed pages would never be read back; instead new pages would be created.) |
| Comments |
| Comment by Marko Mäkelä [ 2018-04-05 ] |
|
do_not_flush_freed_temp_pages.patch |
| Comment by Marko Mäkelä [ 2019-03-11 ] |
|
Perhaps we should use asynchronous writes for advancing the redo log checkpoint, and synchronous I/O for anything else (page reads and writes). For example, if a user thread wants to replace a buffer pool page with something else (to initialize or read a different page), then it could write a page to the temporary tablespace, unless the page was already marked to be free. This would be the only source of writes to the temporary tablespace file. Read-ahead requests could be delegated to a background thread. |
| Comment by Marko Mäkelä [ 2020-04-20 ] |
|
|