Re: How to flush data most efficiently from memory to disk when db checkpoint?

From: <JianC.Xie_at_gmail.com>
Date: Sun, 01 Jul 2007 13:48:29 -0000
Message-ID: <1183297709.917741.10860_at_x35g2000prf.googlegroups.com>


On Jul 1, 4:27 pm, Sune <sune_ahlg..._at_hotmail.com> wrote:
> Hi,
>
> I'm looking into designing an in-memory DB and I wonder:
>
you should have a look at cache policy in OS.
> How to flush data most efficiently when I checkpoint?
>
> Say I have a page size of 8K and 1K of those have been updated in
> random places, that is, the changes may be contiguous but most likely
> they are not.
>
> Will it always be more efficient to flush the whole page instead of
> keeping track of each element and write them to disk one by one?
> Obviously, if I did this I would flush them from page offset 0 to the
> end of the page, in that order.
>
operating system always use cache to make operation more efficient. at the lower layer, the method for flush is depend on strategy routine.
And it always merge the possible block to write or read contiguous and full page.

> Sorry to bother you with such elementary questions but I want to get
> things right from the beginning, and other people's experiences are
> usually very helpful.
>
> Thanks for your time
> /Sune
Received on Sun Jul 01 2007 - 15:48:29 CEST

Original text of this message