2

I'm guessing the answer is no, but I was wondering if there was anyway to tell innodb to not store fetched pages in the buffer pool?

The reason for looking at doing this is check summing tables. I'd like to minimize the effects of trashing the useful cached data.

asked Jan 27, 2012 at 0:14

1 Answer 1

2

Months later I stumbled across the effective solution to what I was seeking in my question.

From the docs itself there are two variables to help prevent the trashing of the buffer pool for large table scans such that would occur during a checksum or mysqldump.

The first is innodb_old_blocks_pct (default 37%). This the sublist of pages that are eligible for eviction when a new page is inserted. When a new page is first read it is added to the head of this list.

innodb_old_blocks_time (default 0) defines the number of milliseconds after being added must elapse before an access that cause it to move out of the old list to the head of the new list. Since the default is 0 the first access puts it to the head of the new list.

So in short set innodb_old_blocks_time to a nonzero value, say 500, and then a table scan will basically just cause the old sublist to continually get cycled through. Pages getting read for other purposes will remain in the new list allowing your DB to remain warmed with real application relevant data!

answered Apr 3, 2012 at 6:02
2
  • Brilliant solution and a hearty +1 !!! Commented Apr 3, 2012 at 19:07
  • In MySQL 5.7 innodb_old_blocks_time defaults to 1000 Commented Dec 6, 2017 at 10:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.