[Csync2] sqlite3 and _FILE_OFFSET_BITS=64 commited

Art -kwaak- van Breemen ard+csync2 at telegraafnet.nl
Thu Aug 14 15:05:40 CEST 2008


On Tue, Aug 12, 2008 at 02:07:29PM +0200, Art -kwaak- van Breemen wrote:
> Currently I am busy setting up a 500k+ files repository, so yes,
> I hit some of those things ;-). (Especially the last one)
root at nathalie:~# sqlite3 /var/lib/csync2/nathalie.db3 "select count(1) from file"
4030137
Heh... I am probably at 50% .... It's still "indexing".
Anyway: an strace -c of csync2 -vv -B -A -c delivers:
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 25.99    0.014108           2      7968           unlink
 23.60    0.012815           3      3984           lstat64
 19.46    0.010563           0    170988           write
 13.93    0.007562           0     15939           open
  4.00    0.002172           0    200624           _llseek

The unlink is the unlink of the database journal on reiserfs.
It would be interesting to see how much speed it would gain when the journal
would not be unlinked. (unlink is a meta data operation, which probably commits
the reiserfs journal).
The lstat64 is the stat of the file, nothing we can do about that.
Open is also opening and creating the journal. So not unlinking the journal
could mean > 30% less time spend in sqlite3.

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in email?


More information about the Csync2 mailing list