Theory questions about ovdb
Heath Kehoe
heath.kehoe at intermec.com
Fri Jul 7 20:03:50 UTC 2000
>I did not do a good job asking the separate questions,
>so I think you misunderstood they were all related.
>
>
>In the question about retries, I wrote:
>
>>Does it make sense to add a retry limit and failure with log
>>(such as in ovdb_groupadd() and elsewhere.) How often
>>in real life circumstances does a retry get needed? Right
>>now it looks like it could infinite loop.
>
>By retry, I meant the places in ovdb.c where there is
>a "goto retry"
>
Ah, I see... I havn't measured retries; but I have never observed
the code getting stuck in a retry loop. It may still be possible,
though. I will put in some code to count and report retries, and
enforce a retry limit.
>
>------------------------------------------------------------
>
>Unrelated to the question about retries, I was trying to understand
>the performance implications of
>
> key.data = &dk;
> key.size = sizeof dk;
> val.flags = DB_DBT_PARTIAL;
> ret = dbcursor->c_get(dbcursor, &key, &val, DB_SET_RANGE)) {
> loop
> ret = dbcursor->c_get(dbcursor, &key, &val, DB_NEXT);
>
>Is it O(1)? (I hope!)
>
>Since it is a B-tree, keys are sorted, so that answers
>my question I guess: that iteration should be O(1), unless
>there is something tricky about the keys and data are
>stored separately. Hope I understand it....
>
AFAIK, each iteration is O(1).
>------------------------------------------------------------
>
>Thanks for adding the note about expected performance. For a
>good point of comparison can you also add
>
> How many articles per day to you store into overview.
>
> How many simultaneous reader connections you see.
>
About 300k-450k articles per day; usually don't have more than
15 or 20 simultaneous readers. This is from a recent news.daily
report:
INND timer:
Code region Time Pct Invoked Min(ms) Avg(ms) Max(ms)
article cancel 00:04:38.498 0.3% 28439 0.556 9.793 150.385
article control 00:04:36.053 0.3% 27869 0.500 9.905 192.300
article link 00:00:00.000 0.0% 0 0.000 0.000 0.000
article write 00:56:44.871 3.9% 329610 4.551 10.330 38.375
history grep 00:01:04.433 0.1% 24582 0.000 2.621 54.700
history lookup 00:09:01.394 0.6% 2014810 0.027 0.269 7.886
history sync 00:00:08.415 0.0% 27281 0.114 0.308 2.565
history write 01:12:56.162 5.1% 542363 3.998 8.069 26.562
idle 10:42:42.711 44.6% 6675025 2.375 5.777 22.248
overview write 00:58:56.600 4.1% 329610 5.534 10.730 48.734
perl filter 05:33:11.631 23.1% 536458 14.620 37.266 126.338
site send 00:14:00.303 1.0% 1085179 0.600 0.774 1.324
-heath
More information about the inn-workers
mailing list