Subject: Re: [boost] [threadpool] mixture of recursive invokation and fibers?
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-11-05 04:46:55
----- Original Message -----
From: "Oliver Kowalke" <k-oli_at_[hidden]>
Sent: Wednesday, November 05, 2008 10:25 AM
Subject: Re: [boost] [threadpool] mixture of recursive invokation and
> > Imagine we have stage A which reads message from the network and stage B
> > processing
> > the messages read by A. If both use the same threadpool and mltiple
> > clients send a large
> > messages (ready will take some significant time) stage A coul possibly
> > allocate all
> > threads in the pool so not work-item in stage B can be executed. If both
> > stages use
> > different pools the processing of work-items is independent.
> > B can executes its task even if stage A becomes a high load.
> Why the A would allocate all the the threads in the pool? If the stage A
> handle a message and the request B to do somthing the task of B will be
> enqueued before other new messages comming from the network, so B will be
> interleaved with A. What I'm missing?
data-flow: network -> stage A -> stage B -> network
If 10.000 clients are connected to the service and 1% of the clients send a
large message then stage A is triggered to read/process 100 requests at the
same time - possibly all threads of the pool are used by stage A and tasks
of stage B are queued in the pool until a worker-thread are finished with
items of A.
Maybe, I would like to see some benchmarks.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk