[ZODB-Dev] BTree performance characteristics

Toby Dickenson tdickenson@geminidataloggers.com
Tue, 16 Jul 2002 23:43:35 +0100


On Tuesday 16 Jul 2002 5:06 pm, Tim Peters wrote:
> [Toby Dickenson]
>
> > I am looking at the number of persistent objects modified by
> > different OIBTree operations.
> >
> > I see that the number is nicely low when *adding* elements to a
> > BTree. However the number is much higher when changing the value
> > associated with an existing key.
> >
> > Are BTrees known to work this way? or do I have something wierd
> > going on?
>
> It sounds fishy to me, but there's more than one implementation of BTre=
es
> floating around and I only know about one of them.  In that one, changi=
ng a
> value associated with an existing key should mark only the leaf-level
> OIBucket containing the key as modified.

False alarm.... it looks like the difference is down to the order in whic=
h=20
keys are presented. In my second phase I must be rarely hitting the same=20
bucket twice; averaging 1.3 value changes per persistent object written. =
In=20
the first phase it averages 40 additions per persistent object written - =
that=20
is almost unbelievably good.