Bump up the nr of ZOpe trhreads
Hello! Apart from the -t option to z2.py (that, afaik, limits me to only 7), what other settings do I need to change to bump up the number of Zope threads to around 20, both for ZServer and for ZODB Accesses? If i change these settings, which one will allow me to have around 20 threads available to access an external Oracle DB (the zserver or the ZODB)? TIA, /dario - -------------------------------------------------------------------- Dario Lopez-Kästen, dario@ita.chalmers.se IT Systems & Services System Developer/System Administrator Chalmers University of Tech.
You'll also want to change the number of database connections. If you use FileStorage, put the following in a "custom_zodb.py" file in your Zope software home or instance home (if you run an instance home setup): import ZODB.FileStorage import ZODB.DB filename = os.path.join(INSTANCE_HOME, 'var', 'Data.fs') Storage = ZODB.FileStorage.FileStorage(filename) DB = ZODB.DB(Storage, pool_size=25, cache_size=2000) The "pool_size" parameter is the number of database connections. The number of database connections should always be higher than the number of threads by a few (it doesn't make sense to have fewer database connections than threads). - C ----- Original Message ----- From: "Dario Lopez-Kästen" <dario@ita.chalmers.se> To: <zope-dev@zope.org> Sent: Monday, September 09, 2002 5:02 AM Subject: [Zope-dev] Bump up the nr of ZOpe trhreads Hello! Apart from the -t option to z2.py (that, afaik, limits me to only 7), what other settings do I need to change to bump up the number of Zope threads to around 20, both for ZServer and for ZODB Accesses? If i change these settings, which one will allow me to have around 20 threads available to access an external Oracle DB (the zserver or the ZODB)? TIA, /dario - ------------------------------------------------------------------ -- Dario Lopez-Kästen, dario@ita.chalmers.se IT Systems & Services System Developer/System Administrator Chalmers University of Tech. _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
----- Original Message ----- From: "Chris McDonough" <chrism@zope.com>
You'll also want to change the number of database connections. If you use FileStorage, put the following in a "custom_zodb.py" file in your Zope software home or instance home (if you run an instance home setup):
import ZODB.FileStorage import ZODB.DB
filename = os.path.join(INSTANCE_HOME, 'var', 'Data.fs') Storage = ZODB.FileStorage.FileStorage(filename) DB = ZODB.DB(Storage, pool_size=25, cache_size=2000)
The "pool_size" parameter is the number of database connections. The number of database connections should always be higher than the number of threads by a few (it doesn't make sense to have fewer database connections than threads).
Great, thanks :-) But, am I still limited to max 7 zope threads? I wish to have around 20. About 1/2 to 1 year ago I recall being told that with python z2.py -t nrOfThreads nrOfThreads could be set to whatever but Zope would not use more than 7 in any case. Is this so still? Can it be changed? And is -t a parameter for zserver or for the ZODB? TIA /dario - -------------------------------------------------------------------- Dario Lopez-Kästen, dario@ita.chalmers.se IT Systems & Services System Developer/System Administrator Chalmers University of Tech.
On Tue, 2002-09-10 at 06:51, Dario Lopez-Kästen wrote:
But, am I still limited to max 7 zope threads?
No.
nrOfThreads could be set to whatever but Zope would not use more than 7 in any case. Is this so still? Can it be changed? And is -t a parameter for zserver or for the ZODB?
You can set this to whatever you like, but as I said before it doesn't make sense to have fewer database connections than threads, so they go sort of hand-in-hand. The parameter is the number of ZPublisher "worker" threads. This is how many threads are hanging around to service requests that come in to ZPublisher (typically via ZServer, but not always). These threads are *related* to the ZODB (as each one typically accesses it), but are not "ZODB threads" (there is no such thing). - C
<snip> Great, now I understand better. Thanks a lot! :-) /dario
On Monday 09 Sep 2002 10:02 am, Dario Lopez-Kästen wrote:
Hello!
Apart from the -t option to z2.py (that, afaik, limits me to only 7), what other settings do I need to change to bump up the number of Zope threads to around 20,
remember that "-t 20" uses 20 times more memory than "-t 1" . Might you be better off with a smaller number of threads, and use the memory for a huge cache for oracle queries?
both for ZServer and for ZODB Accesses? If i change these settings, which one will allow me to have around 20 threads available to access an external Oracle DB (the zserver or the ZODB)?
participants (3)
-
Chris McDonough -
Dario Lopez-Kästen -
Toby Dickenson