[Zope-dev] Zope reference counts

Toby Dickenson tdickenson@geminidataloggers.com
Wed, 22 Jan 2003 15:28:17 +0000


On Wednesday 22 January 2003 3:10 pm, Ivo van der Wijk wrote:
> On Wed, Jan 22, 2003 at 11:57:20AM +0000, Toby Dickenson wrote:
> >
> > 1. Obviously, use fewer threads. Do you have a component that otherwi=
se
> > benefits from many threads?
>
> No, except that the server is pretty heavy loaded sometimes, and multip=
le
> threads should improve responsiveness (right?)

Not if your machine is cpu-bound.

You need enough threads to keep your cpu busy, but any more than that mea=
ns=20
each one gets a smaller share of the cpu, and a smaller share of the memo=
ry.=20
All my Zopes have 1 or 2 worker threads.

> > 2. If you have large immutable state that does not hold references to
> > persistent objects, use application-specific code to share this state
> > between threads.
>
> Not really. The bloat is caused by a large squishdot site (20.000 comme=
nts)

That will really benefit from 2.6 and a bigger cache, as seb suggested. F=
ewer=20
threads means you can have a bigger per-thread cache, for the same total=20
memory usage.

--=20
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson