Open Source Applications Foundation

[Dev] ZODB for object persistence [Was: ZODB is not a Storage Technology]

John Anderson Mon, 11 Nov 2002 10:35:10 -0800


Morgan wrote the the ZODB test program. I don't think he did a commit at 
every creation. The way I was imagining using ZODB in Chandler, a commit 
would happen once per "user command" and correspond to an undoable 
action --  so if they should be relatively rare.

Morgen: can you post the details of your test program.

John Anderson

Jeremy Hylton wrote:

>>>>>>"JA" == John Anderson <john@osafoundation.org> writes:
>>>>>>            
>>>>>>
>
>  JA> My test program for object creation using ZODB4 goes from
>  JA> somewhere around 20,000 objects created per second to 300 per
>  JA> second once you throw in transactions. I'd like to use
>  JA> transactions for undo and resource exaustion recovery.
>
>How did you throw in transactions?  If, for example, you added a
>commit after every object creation, I think I'd be happy if you could
>achieve 300 creations/sec <0.3 wink>.
>
>A transaction is a relatively heavyweight operation and object
>creation is an incredibly lightweight operation.  I'm sure transaction
>commits can be optimized, but it's still going to be a big hit if you
>use very fine-grained transactions.  Do you think that's necessary for
>you application?
>
>I'd also note that important parts of ZODB4, notably the object cache,
>are still using throw-away code written in Python.  There's a reason
>we haven't released ZODB4 yet.  For the Dec. alpha release, we'll have
>an object cache written in C that should improve performance.  If
>you're looking to benchmark code, ZODB 3.1 will give you more
>realistic numbers.
>
>Jeremy
>
>PS My own crude benchmark (creation an object passing two args to
>__init__) was:
>
>classic class      118000 creations/sec
>new-style class     66700 creations/sec
>Persistent class      181 create+commit/sec (using FileStorage)
>  
>