[zeromq-dev] Proxy with inproc frontend

Goswin von Brederlow goswin-v-b at web.de
Tue Feb 4 11:17:06 CET 2014


On Mon, Feb 03, 2014 at 02:44:18PM -0800, Cosmo Harrigan wrote:
> Hi Goswin / Brandon,
> 
> On Mon, Feb 3, 2014 at 8:01 AM, Goswin von Brederlow <goswin-v-b at web.de>wrote:
> 
> > Don't create threads like that. Create a thread pool of handlers that
> > keep their sockets connected and dispatch events to them. That solves
> > your problem and also cuts down on the (rather long) time to start a
> > thread per event.
> >
> 
> In that approach, how would you suggest choosing the number of listener
> threads to create?

Assuming the events don't block or otherwies run for a long time I
would make one per core and maybe even set the cpu affinity to keep
each on their own core. It's like you can run more than number of
cores in parallel.
 
MfG
	Goswin



More information about the zeromq-dev mailing list