0

page cleaner

InnoDB performs certain tasks in the background, including flushing of dirty pages from the buffer pool. Buffer pool flushing is performed by page cleaner threads.

background writer

InnoDB uses background threads to service various types of I/O requests. With synchronous I/O, query threads queue I/O requests, and InnoDB background threads retrieve the queued requests one at a time, issuing a synchronous I/O call for each. When an I/O request is completed and the I/O call returns, the InnoDB background thread that is handling the request calls an I/O completion routine and returns to process the next request.

question

What are the differences between these two entities? Reading MySQL documentation is hard to understand. So do the page cleaners do the writes on the buffer pool, and the background writer do the writes elsewhere?

1
  • I would guess that a "page cleaner" would decide what pages to write, but then ask the "background writer" to handle the I/O for it. The former is just one of "various types of I/O requests".
    – Rick James
    Jun 20, 2022 at 23:40

1 Answer 1

0

page cleaner: when you execute commands on your database such as insert, update, and delete. data will change but before it goes to the hard disk it will go to the buffer. to make sure any other user will get the updated data from the database, and prevent data loss page cleaner will push those changes from the buffer to the hard disk.

I am not sure, about the other one, would you please provide me with the link to check, maybe it has another name or a parameter we use.

1
  • Thanks for the answer! background writer. And by reading the documents, many things are not clear, as I also post here.
    – Tim He
    Jun 9, 2022 at 11:17

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.