On 1/19/15, Roger Binns <rog...@rogerbinns.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 01/18/2015 06:49 PM, Wei, Catherine wrote:
>> takes too much time when it executes fsync or fdatasync function.
>
> Note that although the documentation says only the file handle is
> synced, in practise many filesystems actually sync the whole
> filesystem writing out all pending data for all files.
>
> The reason is the underlying filesystem is written to carefully write
> content (especially meta data) in a particular order, to ensure
> robustness against power losses, make syncs easier to manage, and make
> fsck easier.  Trying to sync just the one file handle is too
> complicated, so they sync everything.
>
> You need to watch out for other write activity on the system, not just
> SQLite.
>

All true.  But also note that you can dramatically reduce the number
of fsync() calls by using WAL mode in SQLite.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to