[zeromq-dev] C Based ZeroMQ Aggregation Server Problems...

Chuck Remes cremes.devlist at mac.com
Mon Oct 17 22:50:47 CEST 2011

On Oct 17, 2011, at 3:42 PM, Amr Ali wrote:

> Hi Pieter,
> This is probably unrelated, but on a high traffic setup like the one being
> discussed, wouldn't one want 2 I/O threads to handle the traffic coming in
> without blocking/waiting for a busy thread to handle sending out messages on the
> PUB socket?
> I understand that without setting the affinity on the sockets, both threads will
> be doing the receiving and the sending, but wouldn't that affect concurrency and
> eventually cause congestion on that single thread if there are a lot of messages
> to receive?

I doubt this will be an issue on anything less than a 10Gb network. The rule of thumb is to use 1 I/O thread per *gigabit* of data that you are processing (regardless of in/out flow).

Using additional I/O threads also means that there is now potential contention inside the library. Why do it if it won't help?

And, as always, you cannot know for sure how to best configure your environment without benchmarking/testing it. Try it with 1 I/O thread and see if your throughput drops.


More information about the zeromq-dev mailing list