Re: [Zope] Zope memory usage / cache

2001-01-31 Thread ender

On Tuesday 30 January 2001 21:21, Ron Bickers wrote:
  -Original Message-
  From: ender [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 30, 2001 10:12 AM
  To: Ron Bickers; [EMAIL PROTECTED]
  Subject: Re: [Zope] Zope memory usage / cache
 
  this sounds like normal operating system behavior. memory isn't
  being free'd
  just dealloc and returned to the program heap and marked as available.

 Ok.  So you're saying that even though it says it's taking 50MB, much of
 that memory is probably available for other applications?  

warning: i'm on shaky ground here.

this is very os dependent. most os's don't resize a process's heap down on a 
dealloc. instead the heap has more available memory for that process (ie 
Zope), other processes will have to alloc from free memory.

the management of free heap space and disk caching is again os dependent, but 
a good os should try to do some optimization of heaps before thrashing, so 
starting a new process should cause a problem.


Does this mean
 that if another application actually starts to use that memory that the
 Zope process should start showing a reduction in use? 

no.

 How can I (if I can)
 see how much is really available? 

 i'm not sure how you would do this on linux.


Also, does the free memory below not
 necessarily reflect the amount of memory that is actually available for
 applications that may need it?

no it does not (again os dependent). free memory is indicator of the os free 
resources for new and current processes. for existing processes it is a 
indicator not a def. answer.

  total   used   free sharedbuffers cached
 Mem:126312 122936   3376  48424   5820  29952
 -/+ buffers/cache:  87164  39148
 Swap:   530104  21876 508228

 Sorry if this is inappropriate for the Zope list.  I have only *noticed*
 this behavior with Zope, but that may not mean anything.

if you're on linux trying starting up a large app (gimp comes to mind as a 
good one) and loading and unloading some large docs, and watch what happens


kapil

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Zope memory usage / cache

2001-01-30 Thread ender

On Tuesday 30 January 2001 10:09, Ron Bickers wrote:
 I have a site that has dozens of 300k+ Photo objects
 (http://www.zope.org/Members/Drew/Photo).  When I start Zope, it uses about
 10MB.  It will run at around 10-12MB for days as long as I don't access any
 of the photos.  Once I access several of the photos, it jumps up to around
 50MB.  The debug info says there are over 200 Photo object references.

 If I then do a Cache minimize, there are no longer any Photo object
 references, but the memory usage remains 50MB.  It will stay that high
 indefinitely (at least as long as I have tested -- a few days), even if the
 site isn't accessed.  If I restart, it goes back down to 10MB, and it will
 stay there as long as my photos aren't accessed.

 Is this normal behavior?  It seems crazy to have Zope sucking up that much
 memory when those photos are hardly ever accessed.

this sounds like normal operating system behavior. memory isn't being free'd 
just dealloc and returned to the program heap and marked as available. 

kapil

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )