On Wed, Dec 8, 2010 at 11:06 AM, Malthe Borch <mbo...@gmail.com> wrote:
> With 20 active threads, each having rendered the Plone 4 front page,
> this approach reduced the memory usage with 70 MB.

Did you measure throughput of the system? In the benchmarks I've seen
threads numbers of 3 or above will perform worse than one or two
threads. At least with the GIL implementation up to Python 2.6 you get
much worse performance the more threads you have on multicore systems.
There's good explanations of the behavior done by David Beazley at
http://www.dabeaz.com/blog.html.

In default Plone 4 we have two threads per instance. If you have more
than a single ZEO instance you should reduce the thread number to one.
We also set a default Python checkinterval of 1000 (instructions),
which prevents thread switching for long stretches of time to counter
the GIL in the two thread case.

So while sharing data between threads might sound interesting, it's
not of much help in Python.

Hanno
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to