We are seeing a bizarre and unexplained phenomenon with ZeroMQ on Windows 7
, sending messages over TCP.( Or over inproc
, as ZeroMQ uses TCP internally for signalling, on Windows ).
The phenomenon is that the first 500 messages arrive slower and slower, with latency rising steadily. Then latency drops and messages arrive consistently rapidly, except for spikes caused by CPU/network contention.
The issue is described here: https://github.com/zeromq/libzmq/issues/1608
It is consistently 500 messages. If we send without a delay, then messages are batched so we see the phenomenon stretch over several thousand sends. If we delay between sends, we see the graph more clearly. Even delaying as much as 50-100 msec between sends does not change things.
Message size is also irrelevant. I've tested with 10-byte messages and 10K messages, with the same results.
The maximum latency is always 2 msec (2,000 usec).
On Linux boxes we do not see this phenomenon.
What we'd like to do is eliminate this initial curve, so messages leave on a fresh connection with their normal low latency (around 20-100 usec).
Update: the issue does not show on Windows 10 nor 8. It seems to happen only on Windows 7.