Active Zope threads and connection cache size
Does the size of the connection cache need to grow when Zope runs more threads. I currently am running 8 threads (default 4). I note that the current OODB connection cache size is FIXED at 7. Do I need to increase the size? I would have guessed the connection cache should be somewhat larger than the number of threads and that it should be set dynamically. Can anyone hazard a guess as to what it should be? twice the number of threads? more? I am running Zope 2.6.3b2 but I think the same question is relevant for all versions of Zope.
connection cache is the number of objects cached in each zodb connection, its not directly correlated to threads except that each thread get its own connection for the course of a request, as a rough guide i would suggest working up from a size of 5k for the connection cache.. if an object is not in cache zope needs to load it at run time from the zodb. connections are managed as a lifo stack to maximize cache effectiveness. generally, running more threads is really not going to increase throughput unless the threads are blocking, for example on long running external database connections. running more threads than the hard set limit of 7 connections is also of questionable value as the thread will sleep on a lock till it can get a connection. hope that helps, -kapil On Fri, 2004-03-26 at 21:20, Dennis Allison wrote:
Does the size of the connection cache need to grow when Zope runs more threads. I currently am running 8 threads (default 4). I note that the current OODB connection cache size is FIXED at 7. Do I need to increase the size? I would have guessed the connection cache should be somewhat larger than the number of threads and that it should be set dynamically. Can anyone hazard a guess as to what it should be? twice the number of threads? more?
I am running Zope 2.6.3b2 but I think the same question is relevant for all versions of Zope.
_______________________________________________ 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 )
We use MailBoxer for collecting mails, and want a script to move an object received by mailBoxer to a user's own folder. However, it seems that since the MailBoxer runs as anonymous, the copy and paste are unauthorized. We have Manager proxies set for the relevant scripts, and tried placing various parts of the process in an External method. The scripts work ok when executed by an authorized user. I found an earlier related question and Dieter's answer (below). Is this the only way? At 23:58 +0200 14.4.2002, Dieter Maurer wrote:
Noel Duffy writes:
* create a request object with authentication information, perform a "traverse" on this object (this will set the user) and then call "manage_pasteObjects" on the traverse to object.
Thanks for the quick reply.
Do you have an example of how one would do this, as I cannot quite picture in my head how this should be approached? Attached...
You would use it in the form:
from request import getAuthRequest
R=getAuthRequest() # your authenticated request object (sure, you modified USER and PASSWORD!)
o= R.traverse(URL) # the (site relative) URL of the object you want to reach
# whatever you want to do with "o"
khk
Kari-Hans Kommonen wrote:
We use MailBoxer for collecting mails, and want a script to move an object received by mailBoxer to a user's own folder.
However, it seems that since the MailBoxer runs as anonymous, the copy and paste are unauthorized.
MailBoxer 3.2 supports authenticated requests. See the smtp2zope.py how to set the credentials. Then MailBoxer can run as "Manager" and maybe the copy&paste-bug can be worked around. If not, let me know, but I think the problem is "zope-related-in-general". Cheers, Maik
Maik, thanks for the answer. We have (for historical reasons) patched the Mailboxer we are running (I believe 2.1.5?) and will upgrade later, so that may help us then. I was just surprised as I did not find any elegant way to simply move a file in zope in a background process with proxy roles. kh At 18:12 +0200 25.6.2004, Maik Jablonski wrote:
Kari-Hans Kommonen wrote:
We use MailBoxer for collecting mails, and want a script to move an object received by mailBoxer to a user's own folder.
However, it seems that since the MailBoxer runs as anonymous, the copy and paste are unauthorized.
MailBoxer 3.2 supports authenticated requests. See the smtp2zope.py how to set the credentials. Then MailBoxer can run as "Manager" and maybe the copy&paste-bug can be worked around. If not, let me know, but I think the problem is "zope-related-in-general".
Dennis Allison wrote at 2004-3-26 18:20 -0800:
Does the size of the connection cache need to grow when Zope runs more threads. I currently am running 8 threads (default 4). I note that the current OODB connection cache size is FIXED at 7.
When you allocate more threads, you probably should allow for more ZODB connections.
From Zope 2.7 on, you can control this via the configuration file.
-- Dieter
participants (5)
-
Dennis Allison -
Dieter Maurer -
Kapil Thangavelu -
Kari-Hans Kommonen -
Maik Jablonski