Re: [Zope] manage_minimize

2005-11-04 Thread Jens Vagelpohl


On 4 Nov 2005, at 11:33, Krzysztof Kubacki wrote:


Hi,

Zope-2-7-6
I would like to minimize cache of my ZODB mounted database by  
manage_minimize function from PythonScript placed in Root Folder.


Why? Do you expect to reduce the Zope memory footprint? That won't  
happen on most operating systems...


jens

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] manage_minimize

2005-11-04 Thread Sascha Ottolski
Am Freitag, 4. November 2005 11:33 schrieb Krzysztof Kubacki:
 When I do it this way
 context.Control_Panel.Database.mounted_database.manage_minimize() it
 minimizes main database but not mounted_database,

 but when I do it this way
 context.REQUEST.RESPONSE.redirect('Control_Panel/Database/mounted_database/
manage_minimize') it works.

 Why??? I have to use the first solution becouse I'm going to place more
 code after minimizing.

I believe something like 

container.Control_Panel.Database['mounted_storage'].manage_minimize()

should to the trick; and would think that your version should throw an 
AttributeError. strange that it doesn't :-)


Hope it helps,

Sascha

-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany

+++
AKTUELLER HINWEIS (November 2005)

Lesen Sie bei Gallileus über aktuelle Forschungsergebnisse
aus den Hochschulen:

http://www.gallileus.info/gallileusnews/gInstitutionen/
+++
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] manage_minimize

2005-11-04 Thread Sascha Ottolski
Am Freitag, 4. November 2005 11:34 schrieb Jens Vagelpohl:
  Zope-2-7-6
  I would like to minimize cache of my ZODB mounted database by
  manage_minimize function from PythonScript placed in Root Folder.

 Why? Do you expect to reduce the Zope memory footprint? That won't
 happen on most operating systems...

you might not get memory back, but you could prevent that too much is consumed 
in the first place. at least thats what I believe to have observed for long 
running maintenance jobs that touch many (several thousands) objects during a 
transaction. of course, if its possible to commit() once in a while saves way 
more memory.

Cheers, Sascha


-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany

+++
AKTUELLER HINWEIS (November 2005)

Lesen Sie bei Gallileus über aktuelle Forschungsergebnisse
aus den Hochschulen:

http://www.gallileus.info/gallileusnews/gInstitutionen/
+++
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] manage_minimize

2005-11-04 Thread Jens Vagelpohl


On 4 Nov 2005, at 12:43, Sascha Ottolski wrote:


Am Freitag, 4. November 2005 11:34 schrieb Jens Vagelpohl:

Zope-2-7-6
I would like to minimize cache of my ZODB mounted database by
manage_minimize function from PythonScript placed in Root Folder.


Why? Do you expect to reduce the Zope memory footprint? That won't
happen on most operating systems...


you might not get memory back, but you could prevent that too much  
is consumed
in the first place. at least thats what I believe to have observed  
for long
running maintenance jobs that touch many (several thousands)  
objects during a
transaction. of course, if its possible to commit() once in a while  
saves way

more memory.


It's not only possible to commit once in a while during such jobs,  
it's what you *should* do.


jens

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] manage_minimize

2005-11-04 Thread Chris Withers

Jens Vagelpohl wrote:


It's not only possible to commit once in a while during such jobs,  it's 
what you *should* do.


*cough* Stepper *cough*

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )