[zeromq-dev] Bad ZMQ latency on first 500 messages per connection

Pieter Hintjens ph at imatix.com
Tue Sep 29 09:44:19 CEST 2015

Have you excluded the cost of establishing the TCP connection itself
(something around 10 msec, depending on the setup)?

On Tue, Sep 29, 2015 at 8:49 AM, Ben Kloosterman <bklooste at gmail.com> wrote:
> "As can be seen, sender and receiver throughput's differ at the beginning of
> the test. This seems to suggest that there is some kind of buffering
> involved on the lower layers of the stack"
> Nagle is turned off  but it looks like it keeps increasing some sort of
> buffer in the tcp stack.. could also be OS / memory ( page allocation)  /
> Scheduling priority.
> Note in those 500 messages the sender was sending a lot more messages , than
> the receiver was receiving so a buffer would be growing somewhere.
> Ben
> On Tue, Sep 29, 2015 at 4:35 PM, <Christian.Kohrt at rohde-schwarz.com> wrote:
>> Hi all,
>> when sending many messages at once there is a known latency issue: The
>> first 500 messages are sent with a high latency shown in the graph in the
>> whitepaper http://zeromq.org/whitepapers:measuring-performance before it
>> gets to very high speed messaging.
>> The author summarizes:
>> * For latency: ... the latency for first 500 messages is quite poor (up to
>> 1,500 microseconds), however, afterwards it stabilises at approximately 150
>> microseconds, with occasional peaks up to 400 microseconds.
>> * For throughput: This seems to suggest that there is some kind of
>> buffering involved on the lower layers of the stack.
>> In our scenario, we use a Dealer/Router connection, which is in fact like
>> Question:
>> Why have the first 500 messages this latency issue? What is the reason for
>> this and how could we solve this issue, because we require a high
>> performance application even for the first messages.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list