non-blocking checkpiont, physical log & fast recov
Posted in 2010
Topics: Logging & Checkpoints
Dear collegues, I have one question related with non-blocking checkpiont. As far as I know when a checkpoint occurs, IDS blocks all transactions while flushing all dirty pages in the bufferpool to disk. When it finishes writes a checkpoint record to the current logical log and empties the physical log. Whenevr the server starts after a crash, it reads the pages in the physical log push them into the bufferpool and starts rollforward recovery since the last checkpoint record registered in the logical log. Fuzzy checkpiont acts slightly different. Fuzzy pages do not log before images to the physical log, nor they are flushed to disk whenever a fuzzy checkpoint occurs. In the event of a crash, Rollforward recovery does not begin in the last checkpoint record but in the last DML knownn by ther server that has flushed to disk. Could anyone explain me how does a non-blocking checkpiont behaves regarding to the flushing to the physical log and the rollforward recovery after a non-blocking checkpiont. Thanks a lot, Juan Luis Roca
Quick and dirty explanation: - When a non-blocking checkpoint occurs (there are still blocking checkpoints under specific circumstances) what amounts to a provisional checkpoint started record is written to the logical log. Once all required dirty buffers are finally flushed a checkpoint completed record is written to the logical log. - If the server crashes before the final checkpoint complete record is written, the engine reverts to the previous completed checkpoint and rolls forward from there. The physical log records from the previous checkpoint are not needed. The physical log record slapdown is done in case a partial page was flushed to disk during a flush or checkpoint operation occurring at the time of the crash since a physical disk block is typically much smaller than a logical database page (512 bytes versus at least 2K). Since we're starting the rollforward from the previous checkpoint which happened long enough ago that all physical writes should have completed we don't need the physical log records except those since the provisional checkpoint start record was written. That's a very rough explanation, but IB accurate. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Mon, May 31, 2010 at 8:03 AM, JUAN ROCA <jluis.roca@hotmail.com> wrote: > Dear collegues, > > I have one question related with non-blocking checkpiont. > > As far as I know when a checkpoint occurs, IDS blocks all transactions > while > flushing all dirty pages in the bufferpool to disk. > When it finishes writes a checkpoint record to the current logical log and > empties the physical log. > Whenevr the server starts after a crash, it reads the pages in the physical > log push them into the bufferpool and starts rollforward recovery since the > last checkpoint record registered in the logical log. > Fuzzy checkpiont acts slightly different. Fuzzy pages do not log before > images > to the physical log, nor they are flushed to disk whenever a fuzzy > checkpoint > occurs. In the event of a crash, Rollforward recovery does not begin in the > last checkpoint record but in the last DML knownn by ther server that has > flushed to disk. > > Could anyone explain me how does a non-blocking checkpiont behaves > regarding > to the flushing to the physical log and the rollforward recovery after a > non-blocking checkpiont. > > Thanks a lot, > > Juan Luis Roca > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --00504502cc26ec0d060487e34153
Please check out the paper at the URL below. It gives you lots of details, including how non-blocking checkpoints work. http://www.ibm.com/developerworks/data/library/techarticle/dm-0703lashley/ John F. Miller III STSM, Support Architect miller3@us.ibm.com 503-578-5645 IBM Informix Dynamic Server (IDS) ids-bounces@iiug.org wrote on 05/31/2010 05:03:50 AM: > [image removed] > > non-blocking checkpiont, physical log & fast recov [20264] > > JUAN ROCA > > to: > > ids > > 05/31/2010 05:04 AM > > Sent by: > > ids-bounces@iiug.org > > Please respond to ids > > Dear collegues, > > I have one question related with non-blocking checkpiont. > > As far as I know when a checkpoint occurs, IDS blocks all transactions while > flushing all dirty pages in the bufferpool to disk. > When it finishes writes a checkpoint record to the current logical log and > empties the physical log. > Whenevr the server starts after a crash, it reads the pages in the physical > log push them into the bufferpool and starts rollforward recovery since the > last checkpoint record registered in the logical log. > Fuzzy checkpiont acts slightly different. Fuzzy pages do not log > before images > to the physical log, nor they are flushed to disk whenever a fuzzy checkpoint > occurs. In the event of a crash, Rollforward recovery does not begin in the > last checkpoint record but in the last DML knownn by ther server that has > flushed to disk. > > Could anyone explain me how does a non-blocking checkpiont behaves regarding > to the flushing to the physical log and the rollforward recovery after a > non-blocking checkpiont. > > Thanks a lot, > > Juan Luis Roca > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >