Carlos,

> 
> It is well known that the writing performance of FB databases on
> linux, when you have Forced Writes ON and the filesystem has the
> journaling parameter active is horrible and almost unusable if you
> have lots of writing (or even worse, massive/batch updates).
> 
> Question is:  What would be safer:
> 
> Keep FW OFF and Journaling ON
> or
> Keep FW ON and Journaling OFF
> 

Unless the journalling writes pages to the journal as soon as they are queued 
for a disk write, it won't help keep a Firebird database intact.

The consistency of a Firebird database depends on a technique called "careful 
write" in which pages are written in a determined and necessary order so that 
the thing pointed at (e.g. the record) has to be written before the thing that 
points to it (e.g. an index entry).  If you turn off forced write, the O/S 
writes pages in any order it wants.  Generally that's not a problem, because 
the pages are written eventually and cached until they're written so the 
database looks seamless.  And it is, though parts are on disk and parts in 
memory.  A system crash that loses the memory-resident pages will corrupt the 
database.  Probably recovery tools (IBSurgeon) and skilled practitioners 
(IBPhoenix) can recover most of the contents, but you'll certainly have a very 
bad few days.

The careful write architecture was designed in 1981.  A few aspects of 
computing have changed since then, so turning off forced write causes fewer 
corrupted databases than it once did.  Battery backup, non-volatile memory...   

Good luck,

Ann

Reply via email to