[Zope] Zope memory usage out of control

ender kthangavelu@earthlink.net
Tue, 6 Feb 2001 04:55:45 -0800


On Monday 05 February 2001 19:41, Chris McDonough wrote:
> Ron, it would be good if you could add a feature request to the Collector
> about large file object streaming.  I'm not superfamiliar with the code
> there, but I *think* the Image stuff is supposed to break the Image object
> into smaller subobjects and load each one serially out of the ZODB when it
> needs to serve them.  If it's not doing this properly, it needs to get
> fixed.

looking quickly through the image code from cvs, its apparent that images are 
broken up into separate persistent chunks when uploaded into a primitive 
linked list structure thats stored in the zodb. however in serving them zope 
loads all the chunked objects anyways, (without invalidating the object 
(thread zodb) cache on any), so there is no benefit on image serving in terms 
of memory performance, since the entire image needs to be loaded up to serve 
to the client anyway and the all of the chunks will be resident in the 
PicklerCache at that point. which brings up an interesting question of how do 
you remove objects from the PicklerCache. it looks like a call to
self._p_jar.cache.gc_item(key,self)
 will do it?, but it also looks like 
self._p_changed=None 
will also work?

two notes, 
1. this is a very specific condition when you don't want to serve an image 
very frequently

2. it won't decrease memory usage as reported by ps unless multiple images 
are requested on a page. (each image = request = transaction?)

kapil