Hi,

> we noticed that the log flush is very inefficient.
> it writes out every block of 128 bytes as a separate file
> write. On slow files systems (flash) this causes a ton of unnecessary
> overhead.

I never tested flash file systems. Based on your description, regular
database operations are probably also slow there. H2 supports a
pluggable file system, see package org.h2.store.fs. I think it would
make sense to write a 'FileSystemBuffered' and 'FileObjectBuffered'
that bufferes writes. This would simplify the core code. This file
system would act as a wrapper around any underlying file system
operations (FileSystemXYZ, FileObjectXYZ). What do you think?

A new method 'FileObject.flush' is required, because writes to the log
file must be done before writes to the data / index file. And to flush
changes at the end of the recovery task. To simplify buffering I would
flush writes before reading. If it does improve performance for the
normal case, that wrapper could be used for all file systems.

Regards,
Thomas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to