Zope Startup Question: Threads Directive
Question. In Zope startup, is the directiuve "-t 9" equivilent to: "%1 %2 %3 %4 %5 %6 %7 %8 %9" On a fast W2K box, running Zope standalone, with a lot of RAM, what would the optimal number of threads be, for some moderately loaded websites? Harlow Pinson Indepth Learning Email: hpinson@indepthl.com Web: http://www.indepthl.com Voice: 505-994-2135 FAX: 208-475-7678
Question. In Zope startup, is the directiuve "-t 9" equivilent to:
"%1 %2 %3 %4 %5 %6 %7 %8 %9"
No... these are command-line options. When you pass -t9, this takes the place of one of them.
On a fast W2K box, running Zope standalone, with a lot of RAM, what would the optimal number of threads be, for some moderately loaded websites?
The default (4) is generally OK. Increasing the number of threads may not increase performance unless you also bump up the size of the ZODB database connection pool (which is hardcoded in the source to 7 via the "pool_size" parameter in the __init__ method of DB.py inside lib/python/ZODB). You can also mess around with the ZODB cache size parameter in the Database Settings control panel applet to see how it effects performance. Coming up with optimum performance numbers is a black art and varies widely from system to system. I recommend sticking with the defaults unless you're willing to spend time doing load testing under different numbers of threads and different connection pool sizes, ZODB cache sizes, and other performance-affecting settings. In other words, "shrug". ;-) - C
Hi Chris, thanks. Could you clarify one thing:
No... these are command-line options. When you pass -t9, this takes the place of one of them.
I'm not sure I understand what you are saying here. What is 'one of them'? The z2.py documentation says this about the -t flag:
-t n
The number of threads to use, if ZODB3 is used. The default is %(NUMBER_OF_THREADS)s.
Harlow Pinson Indepth Learning Email: hpinson@indepthl.com Web: http://www.indepthl.com Voice: 505-994-2135 FAX: 208-475-7678
Just so you know, this really has nothing whatsoever to do with Zope... its just that Zope happens to be started with a Windows batch file. In Windows-world, %1, %2, %3, etc represent arguments to a batch file. So, for instance, if you had a batch file "foo.bat" that had the following contents: echo %1 echo %2 echo %3 If you called foo.bat as 'foo.bat "a" "b" "c"', it would echo a b c Get it? ----- Original Message ----- From: <hpinson@indepthl.com> To: "Chris McDonough" <chrism@zope.com> Cc: <zope@zope.org> Sent: Friday, July 19, 2002 2:02 PM Subject: Re: [Zope] Zope Startup Question: Threads Directive
Hi Chris, thanks. Could you clarify one thing:
No... these are command-line options. When you pass -t9, this takes the place of one of them.
I'm not sure I understand what you are saying here. What is 'one of them'? The z2.py documentation says this about the -t flag:
-t n
The number of threads to use, if ZODB3 is used. The default is %(NUMBER_OF_THREADS)s.
Harlow Pinson Indepth Learning Email: hpinson@indepthl.com Web: http://www.indepthl.com Voice: 505-994-2135 FAX: 208-475-7678
_______________________________________________ Zope maillist - Zope@zope.org 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 )
hpinson@indepthl.com writes:
Question. In Zope startup, is the directiuve "-t 9" equivilent to:
"%1 %2 %3 %4 %5 %6 %7 %8 %9" These are parameters that can be passed on the command line to "start.bat".
"-t 9" is not equivalent to "%1 %2...", unless you call "start.bat -t 9".
On a fast W2K box, running Zope standalone, with a lot of RAM, what would the optimal number of threads be, for some moderately loaded websites? Please search the mailing list archives. Matt Kromer recently explained some heuristic to find good values for the number of tasks. Essence: keep the number low.
Dieter
participants (3)
-
Chris McDonough -
Dieter Maurer -
hpinson@indepthl.com