Subject | RE: [firebird-support] Forced Write comes back |
---|---|
Author | Leyne, Sean |
Post date | 2008-01-24T18:17:40Z |
Nando,
Fortunately, for most OS write caching is disabled by default.
And the same is true for HD caches, the cache is for reads.
The settings control the **window** in which a non-forced write db will
be in danger of being corrupted.
Unless the MaxUnflushedWrites is set to 1, any other value will create a
situation where some disk writes could be unflushed, and therefore the
"on metal" database is potentially corrupt -- due to some pages writes
being potentially written out of order by the OS disk/cache management.
Personally, I will never allow a production database to be deployed with
Forced Writes = OFF -- I want to sleep at night.
Sean
> S> Forced Writes, though, are REQUIRED in order to **absolutelyprotect**
> S> against database corruption.Very true!
>
> well, as long as the other levels of write caching can be disabled.
Fortunately, for most OS write caching is disabled by default.
And the same is true for HD caches, the cache is for reads.
> S> Without Forced Writes, corruptions can and will easily occur onWindows
> S> in the event of a server shutdown/restart while the database isactive,
> S> and occasionally on Linux (the OS is better in this regard).I don't believe that is the correct way to look at it.
>
> Don't forget the MaxUnflushedWrites and MaxUnflushedWriteTime
> parameters, which allow you to decide how much data you can afford to
> lose in case of crash.
The settings control the **window** in which a non-forced write db will
be in danger of being corrupted.
Unless the MaxUnflushedWrites is set to 1, any other value will create a
situation where some disk writes could be unflushed, and therefore the
"on metal" database is potentially corrupt -- due to some pages writes
being potentially written out of order by the OS disk/cache management.
Personally, I will never allow a production database to be deployed with
Forced Writes = OFF -- I want to sleep at night.
Sean