[ZODB-Dev] [ATTENTION] Quadratic runtime behaviour in ZEO protocol logging

Dieter Maurer dieter at handshake.de
Tue Oct 28 14:12:39 EST 2003


This report is for ZODB3 3.1 (as maintained in the "zope2.6_branch"
of the Zope CVS) with Python 2.1.3.

Yesterday, we observed quadratic runtime behaviour in
"ZEO.zrpc.log.short_repr".
As you may know, "repr(list)" (in Python 2.1.3) has quadratic runtime behaviour
in the length of "list". While "short_repr" treats tuples
carefully to avoid the quadratic behaviour, it fails to
do the same for lists.

Large invalidations lists (from a global
catalog "reindex") let the ZEO client block on computing
truncated log messages that were lated dropped.
We killed the reindexing process after waiting for 4 hours during which
the ZEO client continuously consumed more than 95 % of the CPU time.
After lists were treated like tuples in "short_repr", the reindexing
succeeded within 10 min.


Since the upgrade to this ZODB/ZEO version, we also observe
excessive time requirements for cache verification on
ZEO client startup.
This, too, might have its reason in the quadratic behaviour,
maybe the one found in "short_repr". I will investigate this within
the next 2 weeks.


-- 
Dieter



More information about the ZODB-Dev mailing list