[Zope] zserver-threads

Dieter Maurer dieter at handshake.de
Tue Jan 31 14:40:05 EST 2006


Jens Vagelpohl wrote at 2006-1-31 15:07 +0000:
>On 31 Jan 2006, at 15:01, Jake wrote:
>
>> http://plone.org/documentation/how-to/threads-vs-cache-size
>
>That article contains little information to back up the conclusions,  
>and some of it is patently wrong. Another case of hearsay and half- 
>thruths being propagated by well-meaning but uninformed parties.

There is a convincing example (I think from Matt Kromer) what
happens to "mean response time" when the number of threads
is increased from 1 to 2:

  Assume you have 2 units of work. If you have a single
  thread, 1 unit is done, then the second. The
  mean response time is (1 + 2) / 2 = 1.5.

  Now assume you have two threads (but a single processor).
  Both threads work (quasi) parallel but have only half of the
  processor power. Both will take 2 time units to perform
  their unit of work. The mean response time is (2 + 2) / 2 = 2.

You get the same ratios whenever you double the number of threads
(but keep the number of processors and all your work is CPU bound).


Things become more difficult when you have a mix of very small
requests and very long requests. You then may want a higher
level of concurrency to not let the small requests being
blocked by the long ones.


-- 
Dieter


More information about the Zope mailing list