[ZODB-Dev] More timing data
Greg Ward
gward@mems-exchange.org
Wed, 11 Dec 2002 12:45:19 -0500
On 11 December 2002, I said:
> Executive summary: current CVS is 60% *slower* than 3.1 at opening a
> FileStorage with no .index file, and 12% slower at opening one with an
> .index file. Haven't checked memory consumption.
OK, I've done some dirt-stupid analysis of the memory consumption --
basically "while [ 1 ] ; ps -C python ; done". CVS trunk code is not
only 60% slower, it burns through roughly 50% more memory. Here are the
numbers:
3.1, open w/o index peaks at 29332 kB, 28284 kB after open
3.1, open w/ index peaks at 33992 kB, 29888 kB after open
trunk, open w/o index peaks at 43384 kB, 36184 kB after open
trunk, open w/ index peaks at 36188 kB, 36184 kB after open
The memory figures are all from "ps -ovsize", which according to the ps
man page on my system is "total VM size in kB". The initial vsize
before doing any database open is 5300 kB for ZODB 3.1 and 5612 kB for
CVS trunk.
The "peak" figures are from eyeballing that "while [ 1 ] ; ps ..."
trick, and the "after open" figures are from calling os.system("ps ...")
at certain points in the profiling script.
The "open w/ index" figures should all be taken with a grain of salt,
since I open/close/open/close all in the same process -- "open w/o
index" is always the first thing I do. Anyways, I was just curious if
the CVS trunk code trades off memory for speed, but it appears not --
it's both slower and bigger.
Greg