I've tested it in two kinds of Set-Up box. In one box, it costs about
5ms while in the other box, it costs 30ms.  Disks have been removed on
both of them. It's strange why the difference is so big.
Appreciate for you response, thank you.


On 01/20/2015 04:46 AM, Richard Hipp wrote:
> 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.
>

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

Reply via email to