On Fri, Dec 7, 2012 at 3:28 PM, Keith Chew <keith.c...@gmail.com> wrote:
>
> We can see the times taken to do the syscalls are fast, so what is
> causing the delay between the seek and write? I had a look at the
> code, and found the method seekAndWrite(), which looks pretty straight
> forward. The only time it could be slow is when osWrite() return -1.
> Any ideas?
>
> Please advise if I should still try to get vfs=unix-none to work.

Looks like I have managed to pin point the problem area. Here are the results:
-------
Config 1: No latency
-------
PRAGMA journal_mode = OFF;
PRAGMA locking_mode = EXCLUSIVE;
-------
Config 2: Latency observed
-------
PRAGMA journal_mode = WAL;
PRAGMA locking_mode = EXCLUSIVE;
-------
Config 3: Latency observed
-------
PRAGMA journal_mode = OFF;
PRAGMA locking_mode = NORMAL;
-------

>From the above, we can see that:
- WAL itself is not the issue, because config 3 shows the latency without WAL
- Speed of writing to disk is not the issue, because of config 1 & 3

What causes the latency is the common thing between WAL and
locking_mode=normal, and just briefly scanning the code, it looks like
they both lock files before writing to disk.

I am happy to try out any suggestions to pin point this even further.
Any guidance on where I should next look at would be greatly
appreciated! I am happy to change or comment out sections of the code
just to prove things...

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

Reply via email to