Subject Re: [ib-support] When do FB/IB 'flush' to disk?
Author Paul Reeves
"Claudio Valderrama C." wrote:
>
> The FlushFileBuffers function clears the buffers for the specified file and
> causes all buffered data to be written to the file.
>
> BOOL FlushFileBuffers(
> HANDLE hFile // handle to file
> );
>
> Requirements:
> Windows NT/2000: Requires Windows NT 3.1 or later.
> Windows 95/98: Requires Windows 95 or later.
> Header: Declared in Winbase.h; include Windows.h.
> Library: Use Kernel32.lib.
>
> Maybe we could quantify in database pages the threshold to call this
> function?
>


That still leaves a wide margin of error. Whatever value the default is set at
it will leave the possibility that from 1 to n-1 pages will be left in the
cache. For instance, n-1 may be reached at 5:30pm. Everyone gets up and goes
home, leaving the cache almost full overnight.

I thought about a working on a time factor, but for this we would need to
check how long ago each page was 'written' to disc. I think the only solution
is to automatically flush the buffer when the server is idle.


Paul
--

Paul Reeves
http://www.ibphoenix.com
taking InterBase further