How Innodb flushes data to the disk ?

How Innodb flushes data to the disk ?

PREVIOUS POST
NEXT POST

In my previous post I was a bit wrong giving Innodb some properties it does not have.
In fact Innodb does not currently sort pages in their position order flushing them to disk. Pages to be flushed are instead identified by other means – LRU and pages which contain oldest LSN (so which were flushed longest time ago).

As pages are to be flushed are identified Innodb looks at pages pages N-1 and N+1 and if they are dirty schedules flush for these as well. Such approach allows to merge few pages together and perform flushes in larger blocks.

It is really interesting to see how much sorting would speed things up, ie how much flushing pages 1 10000 200 20000 300 30000 in order 1, 200, 300, 10000, 20000, 30000 will help compared to random order and if it is worth to bother or if optimization Innodb performs is good enough and IO subsystem and RAID can do the rest.

PREVIOUS POST
NEXT POST

Share this post

Comments (3)

  • Kevin Burton Reply

    I just always assumed it did that…… Ug.

    The checkpointing in innodb needs some serious work. More on that later.

    July 18, 2007 at 10:06 am
  • Espresso Junkie Reply

    We always wondered about this. Thx for pointing this out!

    July 20, 2007 at 12:42 am
  • Die wunderbare Welt von Isotopp Reply

    Hardware für ein MySQL…

    “Ich muß Hardware für einen Rechner kaufen, auf dem dediziert nur ein MySQL laufen soll. Was soll ich beschaffen?” ist eine Frage, die ich recht oft höre. Hier ist die lange Antwort.

    Bevor man sich mit dem freundlichen Hardwarehöker des gerin…

    July 28, 2007 at 11:58 am

Leave a Reply