Re: [ZODB-Dev] Extenuated memory

2006-03-23 Thread Tim Peters
[Antonio Beamud Montero]
 Well, now I can minimize the cache and get the next values (an unclosed
 connection fixed):
 [['BTrees.OOBTree.OOBTree', 3], ['Persistence.PersistentMapping', 6],
 ['request.Request', 14],  ['status.Status', 3]]

 But my server doesn't free any memory, now it uses 55Mb of resident
 size... How I can debug this references?

Many layers are involved in memory management, from ZODB through
Python down to your platform C's malloc/free implementation and ending
in your OS kernel  Unless you become knowledgable about all of them
(and vital details vary wildly across specific platform C and OS
versions), chances are decent you'll never find a correct answer.

A simple thing to _try_ is compiling with Python 2.5a1 when it comes
out (in a few weeks).One of Python's (many) memory subsystems
never returned large blobs of memory to the platform C free() before
2.5a1, and _may_ return such blobs in 2.5a1, thanks to changes derived
from this patch:

http://www.python.org/sf/1123430

That may or may not reduce your app's memory use.  Note that even if
Python does return more memory to the platform C free(), there's no
guarantee that free() will in turn return such memory to the OS; and
even if free() does return it to the OS, there's no guarantee that the
OS will reduce the process VM reservation; etc.  The easiest--  only
sure --way to find out whether it helps your app using your platform C
and your OS is to try it.
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


[ZODB-Dev] Conflict resolving persistent queue?

2006-03-23 Thread Chris Withers

Hi All,

I was wondering whether anyone had implemented a FIFO persistent queue 
class which has the following conflict resolution strategy:


two concurrent adds: adds both new items to the end of the queue in a 
time-based order


one add and one remove happening concurrently: add the new item and 
remove the removed item


two concurrent removes: re-raise the conflict error.

I can't imagine it'd be hard to knock one up in python if not, in which 
case:


- is there any similar python code I can look at for examples?

- how would I write unit tests for the above 3 cases?

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev