Subject | Re: [ib-support] When do FB/IB 'flush' to disk? |
---|---|
Author | Claudio Valderrama C. |
Post date | 2001-11-29T09:33:06Z |
<lester@...> wrote in message news:3C05DCA5.4FDFB4A5@......
FILE_FLAG_WRITE_THROUGH = Instructs the system to write through any
intermediate cache and go directly to disk. The system can still cache write
operations, but cannot lazily flush them. Also, combining this with a flag
that handles unbuffered access, it could cause a performance improvement...
why do we need buffered access if FB caches the pages it reads?
I think that the function people want is:
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?
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing
> Forced writes flushes every write. I knew ( but up to nowI haven't checked if this is the flag the we use for forced writes:
> had not seen proof ) that with Forced write off, there was a
> problem. I think that what is being asked for - and is
> needed - is an option where rather than writing EVERY
> 'packet', they get writen when there are a number, or when
> disk activity is quiet. THAT is what I was lead to believe
> the Windows caching did. It doesn't, so since Microsoft
> won't fix it how do we?
FILE_FLAG_WRITE_THROUGH = Instructs the system to write through any
intermediate cache and go directly to disk. The system can still cache write
operations, but cannot lazily flush them. Also, combining this with a flag
that handles unbuffered access, it could cause a performance improvement...
why do we need buffered access if FB caches the pages it reads?
I think that the function people want is:
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?
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing