[zeromq-dev] Will socket multiplexing improve throughput?
staffan at spotify.com
Tue Feb 7 15:48:13 CET 2012
On Wed, 2012-02-08 at 01:00 +1100, john skaller wrote:
> On 07/02/2012, at 9:15 PM, Staffan Gimåker wrote:
> >> 2) one pair for each thread w/o synchronization
> >> How much better will 2) compare to 1)?Is it worth the complexity?
> > If ZeroMQ is the bottleneck, i.e. not the data source itself, then 2)
> > will fare better, for two reasons:
> > * No synchronization.
> It's not true there is no synchronisation, it just isn't explicit
> in the user code. You can't send data from one thread
> to another by any means without some kind of barrier
> to synchronise the caches.
You either didn't read the OP or you're splitting hairs. Either way,
it's strictly less synchronization. And there should be no contention if
you use a dedicated socket and io thread per producing thread.
More information about the zeromq-dev