Re: sqlite problems on Mac OS X 10.4

David Relson <[email protected]> Sat, 10 Sep 2005 10:02:17 -0400
Newsgroups gmane.mail.bogofilter.devel
Organization Osage Software Systems, Inc.
Message-ID <[email protected]>
Jim,

I'll let Matthias comment on the different flavors of "BEGIN ...
TRANSACTION" as he's bogofilter's database expert.

Out of curiosity, I decided to test the effect of different numbers of
bogofilter being run with test t.lock3.  The default is 5 copies, as
defined in statement

  seq="1 2 3 4 5"

I changed this to:

  seq=`seq 1 $CNT`

and ran this script:

   for CNT in 5 10 20 50 100 ; do 
      echo "##### $CNT #####"
      export CNT
      time make -s check TESTS=t.lock3
   done

I tested using both "BEGIN TRANSACTION" and "BEGIN EXCLUSIVE
TRANSACTION" on my workstation which is an Athlon XP 2500.

For both versions of the BEGIN...TRANSACTION command testing took
approx 1 second per copy of bogofilter running.  For 5, 10, and 20
copies of bogofilter, all ran fine.  For 50 and 100 copies, some ran
into the "retry count exceeded" condition and quit.  

There were many fewer "retry count exceeded" messages from "BEGIN
EXCLUSIVE TRANSACTION" than from "BEGIN TRANSACTION", which is likely
why they took 82 and 60 seconds, respectively.  I'm inclined to
interpret this as indicating "EXCLUSIVE" is of value.

Also, since 20+ simultaneous copies of bogofilter trying to update the
database is rather extreme, it doesn't seem like a real world situation
that we need to worry about.

FWIW, I've attached the output from the 2 tests.

Regards,

David

_______________________________________________
Bogofilter-dev mailing list
[email protected]
http://www.bogofilter.org/mailman/listinfo/bogofilter-dev
v.sqlite.BEGIN.TRANSACTION.txt (text/plain, 3.9 KB)
[relson@osage src]$ for CNT in 5 10 20 50 100 ; do cd tests ; echo "##### $CNT #####" ; export CNT ; time make -s check TESTS=t.lock3 ; cd .. ; done
##### 5 #####
PASS: t.lock3
==================
All 1 tests passed
==================
5.99user 0.31system 0:08.25elapsed 76%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+15897minor)pagefaults 0swaps
##### 10 #####
PASS: t.lock3
==================
All 1 tests passed
==================
10.88user 0.59system 0:16.35elapsed 70%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+23482minor)pagefaults 0swaps
##### 20 #####
PASS: t.lock3
==================
All 1 tests passed
==================
20.14user 1.01system 0:28.57elapsed 74%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+38619minor)pagefaults 0swaps
##### 50 #####
retry count exceeded, giving up.
FAIL: t.lock3
===================
1 of 1 tests failed
===================
make[2]: *** [check-TESTS] Error 1
make[1]: *** [check-am] Error 2
make: *** [check] Error 2
Command exited with non-zero status 2
46.88user 2.51system 1:01.78elapsed 79%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (1major+84127minor)pagefaults 0swaps
##### 100 #####
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
FAIL: t.lock3
===================
1 of 1 tests failed
===================
make[2]: *** [check-TESTS] Error 1
make[1]: *** [check-am] Error 2
make: *** [check] Error 2
Command exited with non-zero status 2
61.26user 3.87system 1:25.17elapsed 76%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+152568minor)pagefaults 0swaps
v.sqlite.BEGIN.EXCLUSIVE.TRANSACTION.txt (text/plain, 2.2 KB)
[relson@osage src]$ for CNT in 5 10 20 50 100 ; do cd tests ; echo "##### $CNT #####" ; export CNT ; time make -s check TESTS=t.lock3 ; cd .. ; done
##### 5 #####
PASS: t.lock3
==================
All 1 tests passed
==================
5.93user 0.35system 0:08.55elapsed 73%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+15906minor)pagefaults 0swaps
##### 10 #####
PASS: t.lock3
==================
All 1 tests passed
==================
10.72user 0.55system 0:18.12elapsed 62%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+23497minor)pagefaults 0swaps
##### 20 #####
PASS: t.lock3
==================
All 1 tests passed
==================
20.12user 1.03system 0:32.97elapsed 64%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+38651minor)pagefaults 0swaps
##### 50 #####
retry count exceeded, giving up.
FAIL: t.lock3
===================
1 of 1 tests failed
===================
make[2]: *** [check-TESTS] Error 1
make[1]: *** [check-am] Error 2
make: *** [check] Error 2
Command exited with non-zero status 2
46.35user 2.46system 1:26.38elapsed 56%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+84248minor)pagefaults 0swaps
##### 100 #####
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
retry count exceeded, giving up.
FAIL: t.lock3
===================
1 of 1 tests failed
===================
make[2]: *** [check-TESTS] Error 1
make[1]: *** [check-am] Error 2
make: *** [check] Error 2
Command exited with non-zero status 2
82.59user 4.43system 2:50.70elapsed 50%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+159283minor)pagefaults 0swaps