Subject | Re: When do FB/IB 'flush' to disk? |
---|---|
Author | danpalley@hotmail.com |
Post date | 2001-11-28T00:12:25Z |
In Windows, there are flags that control how data is flushed to
disk. These flags are specified as part of the file create/open call.
The default is to keep data in the buffer until the file handle is
closed or flushed or a certain amount of data has been cached. The
idea is that small writes are accumulated in the cache until a full
sector can be written to disk.
You can also flush a handle's contents to disk without closing it;
presumably, this is what IB/FB does when a commit is done on the
database.
Dan
disk. These flags are specified as part of the file create/open call.
The default is to keep data in the buffer until the file handle is
closed or flushed or a certain amount of data has been cached. The
idea is that small writes are accumulated in the cache until a full
sector can be written to disk.
You can also flush a handle's contents to disk without closing it;
presumably, this is what IB/FB does when a commit is done on the
database.
Dan
--- In ib-support@y..., Phil Shrimpton <phil@s...> wrote:
> On Tuesday 27 November 2001 14:35, you wrote:
>
> Hi,
>
> > Windows, however, does not keep the filesize (as you would see it
in
> > Explorer) updated. This is really more of a Windows 'display
glitch'
> > than an IB/FB problem.
> >
> > Equally, if your database and the server were to go *idle* for a
little
> > while and then the server 'die', I would expect that the database
would
> > be un-affected/recoverable since the OS would have flushed the
pending
> > write operations.
>
> I thought that Windows would eventually flush the pending writes to
the file
> in idle time, but in a test...
>
> - I imported 200Mb of data in to a blank database
> - Left the server and client app idle for 4 hours
> - Pulled the power cord
>
> ...the database was blank after boot up
>
> If I close the client's connection, everything is flushed.
>
> This is not mission critical data, so I can afford to lose a few
thousand
> reconds, as they can be re-imported, but I can afford to lose 200Mb
per Day!
>
> Obviously the easiest solution is to disconnect/connect every hour
or so, but
> that seams like a bodge to me.
>
> Phil
> --
> Linux 2.4.4-4GB
> 3:43pm up 34 days, 8:53, 1 user, load average: 0.60, 0.43,
0.28