On 1/31/06, <b class="gmail_sendername">Jake</b> &lt;<a href="mailto:jake@zopezone.com">jake@zopezone.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Am I gleaming from that that you are proposing a less-is-more approach to<br>threads?<br><br>Here is what I have been using:<br>- Zope 2.7.8 (Plone 2.1.2)<br>- RH Linux<br>- AMD Athlon 64 3200+ 2.0 GHz<br>- 2GB DDR RAM<br>
- 120,000 hits a day<br>- 392,036 objects in database<br>- 2 threads<br>- 100,000 object cache size<br><br>This seems to eat up about half of the RAM on the server.<br><br>Would one thread but double the cache size do better?
<br><br>Jake<br>_______________________<br><a href="http://www.ZopeZone.com">http://www.ZopeZone.com</a><br><br><br>On Tue, January 31, 2006 2:40 pm, Dieter Maurer said:<br>&gt; Jens Vagelpohl wrote at 2006-1-31 15:07 +0000:
<br>&gt;&gt;On 31 Jan 2006, at 15:01, Jake wrote:<br>&gt;&gt;<br>&gt;&gt;&gt; <a href="http://plone.org/documentation/how-to/threads-vs-cache-size">http://plone.org/documentation/how-to/threads-vs-cache-size</a><br>&gt;&gt;
<br>&gt;&gt;That article contains little information to back up the conclusions,<br>&gt;&gt;and some of it is patently wrong. Another case of hearsay and half-<br>&gt;&gt;thruths being propagated by well-meaning but uninformed parties.
<br>&gt;<br>&gt; There is a convincing example (I think from Matt Kromer) what<br>&gt; happens to &quot;mean response time&quot; when the number of threads<br>&gt; is increased from 1 to 2:<br>&gt;<br>&gt;&nbsp;&nbsp; Assume you have 2 units of work. If you have a single
<br>&gt;&nbsp;&nbsp; thread, 1 unit is done, then the second. The<br>&gt;&nbsp;&nbsp; mean response time is (1 + 2) / 2 = 1.5.<br>&gt;<br>&gt;&nbsp;&nbsp; Now assume you have two threads (but a single processor).<br>&gt;&nbsp;&nbsp; Both threads work (quasi) parallel but have only half of the
<br>&gt;&nbsp;&nbsp; processor power. Both will take 2 time units to perform<br>&gt;&nbsp;&nbsp; their unit of work. The mean response time is (2 + 2) / 2 = 2.<br>&gt;<br>&gt; You get the same ratios whenever you double the number of threads
<br>&gt; (but keep the number of processors and all your work is CPU bound).<br>&gt;<br>&gt;<br>&gt; Things become more difficult when you have a mix of very small<br>&gt; requests and very long requests. You then may want a higher
<br>&gt; level of concurrency to not let the small requests being<br>&gt; blocked by the long ones.<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Dieter<br>&gt; _______________________________________________<br>&gt; Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;
<a href="mailto:Zope@zope.org">Zope@zope.org</a><br>&gt; <a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>&gt; **&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>&gt; (Related lists -
<br>&gt;&nbsp;&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>&gt;&nbsp;&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev
</a> )<br>&gt;<br><br><br>_______________________________________________<br>Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org">Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope
</a><br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>(Related lists -<br> <a href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a><br> <a href="http://mail.zope.org/mailman/listinfo/zope-dev">
http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br><br></blockquote></div><br>I would recommend exploring ZEO and Squid if you're *this* worried about performance.&nbsp; There's only so much that one machine can do.&nbsp; If I understand the Zope framework, the idea is that read-to-write ratio for the ZODB is going to be much greater than one, meaning that there are going to be a lot more reads than writes.&nbsp; In this case, having some load balancing and ZEO client caching will make overall performance faster.&nbsp; However, if you're doing lots of writing to the ZODB, you'll probably need to explore ZEO even more in the area of mounting different ZODBs at different places in your ZEO clients' trees.
<br><br>Like some of the other people said, you probably should just tune it as needed.&nbsp; It's also a Bad Thing to be running your servers at or near capacity; you should leave plenty of headspace for usage spikes.&nbsp; I've certainly run into situations where Zope stuff was processor-bound and slowing everything down, but the RAM wasn't even 25% full.&nbsp; In cases like this, more zserver threads (or more ZEO clients) helps even things out.&nbsp; YMMV.
<br clear="all"><br>-- <br>Floyd May<br>Senior Systems Analyst<br>CTLN - CareerTech Learning Network<br><a href="mailto:fmay@okcareertech.org">fmay@okcareertech.org</a>