-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sebastian Arcus wrote:
> The SQLite documentation talks about entire database locks by operations 
> of the order of milliseconds - 10 seconds seems a long way off. 

There is a possible but unlikely cause for what you are seeing.  In order to
ensure the database and/or journal are fully on disk, SQLite calls the fsync
system call on the relevant file handle.

Due to the internals of the way the ext3 filesystem is written, an fsync
call actually turns into a sync call which means the fsync does not return
until all outstanding data on that filesystem has been written to disk.  If
you have a slow disk (your laptop most likely does) plus lots of outstanding
data then 10 seconds is quite possible, especially if "laptop mode" is
active (increases the periodic background filesystem sync to 5 minutes in
some cases).  A fun way of showing this is to do a hefty compile as that
will generate lots of big files quickly.

I recommend you run "vmstat 1" in a terminal somewhere while doing your
operations.  Look at the bo/bi columns which show the 1kb blocks being
read/written from disk per second.  The so/si columns show if any swap
activity is happening also using a 1kb reporting unit.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqF2+oACgkQmOOfHg372QQvCgCgr+WTz3tC4eOViSIfPwmHUV7Z
QXAAn2PeO5nLy+fXKeIowsbd+/jgc78m
=njqI
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to