[MDEV-26790] InnoDB read-ahead may cause page writes Created: 2021-10-08  Updated: 2023-01-24  Resolved: 2023-01-24

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7
Fix Version/s: 11.0.1

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: performance

Issue Links:
Relates
relates to MDEV-26782 InnoDB temporary tablespace: reclaimi... Closed

 Description   

The following stack trace could cause reduced performance in cases when the speculative read-ahead is futile, and some useful pages are evicted as a result:

10.5

buf_LRU_get_free_block
buf_page_init_for_read
buf_read_page_low
buf_read_page_background
btr_cur_prefetch_siblings

It could be more useful to only attempt read-ahead if a free block is available in the buffer pool without evicting any page that:

  1. is not marked as freed, or
  2. is not marked as dirty

Furthermore, we should probably avoid read-ahead altogether for temporary tables.



 Comments   
Comment by Matthias Leich [ 2023-01-24 ]

origin/bb-10.11-MDEV-30216-MDEV-26790 c85c38683af18c5851afa5382aa7aaf869536176 2023-01-13T16:46:20+02:00
performed well in RQG testing. Bad effects observed were in the main trees too.

Generated at Thu Feb 08 09:47:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.