How to optimize ZeroMQ Performance On Windows (XP SP3)

Go To StackoverFlow.com

0

I have two Windows XP SP3 machines in which I am trying to send 3k ZMQ messages from one to the other. These are both fairly modern system (Dual Quad Core Xeon with 5100 chipset and Dual Hex Core Xeon with 5500 chipset) with server grade Intel gigabit ethernet cards.

The two machines are connected point to point without a switch or router in between.

With pcttcp for performance comparison I am able to send 70MB/s (56% utilization) via TCP from one machine to the other. With ZMQ PUSH/PULL I am only able to get ~28MB/s between the two.

With the sender and receiver on the same machine (the slower machine of the two) I am able to achieve a rate of 97MB/s. (220MB/s in the dual hex core)

The PUSH/PULL channel has a HWM set on both ends. It performs marginally better if the HWM sizes are set to low (~150 messages) rather than a larger value like 1024.

I tried 6000 byte jumbo frames and it go worse. (pcttcp performed marginally better though @ 72MB/s)

I tried setting TcpWindowSize to a larger value but it seemed to get worse as well. ZMQ liked the lower size, pcttcp did not change. TcpWindowSize is now set to 32K

Other parameters:

  • TcpAckFrequency = 1 // would not work with out this.
  • Tcp1323Opts = 1
  • Receive Side Scaling enabled

How should I approach finding the bottle neck? What should I expect to achieve with TCP and ZMQ performance? The ZeroMQ web site performance section details tests in which the throughput approaches that of TCP (95%+).

Any performance tips / wisdom (aside from use linux, ;-) ) would be greatly appreciated.

Thanks!!!

Another clue: if I setup multiple sender / receiver pairs between the two systems (same direction, different ports) I am able to achieve a higher aggrigate rate. (a total of ~42MB/s with three)

2012-04-05 16:16
by JeffV
any chance you could boil down the code to an example? often with zmq it's a small implementation detail that gets overlooked that causes major slowdowns - g19fanatic 2012-06-13 19:26


1

A quick google pulled this up http://comments.gmane.org/gmane.network.zeromq.devel/10089

The nugget out of that thread is TcpDelAckTicks: [quote]

I got a huge increase of performance (2.4 seconds to 0.4 seconds) after setting TcpDelAckTicks registry value to the machine that does "apr_socket_accept()" -call in the server code. Client just sends request and waits for response in loop. There was no change in performance.

The reason I got there was because I was looking for something around MTU, thinking that it might be network related.

And then I found this http://lists.zeromq.org/pipermail/zeromq-dev/2010-November/007814.html, which has a number of performance tuning recommendations (tho not specifically xp), I won't summarise here, as it would be an almost direct copy and paste (not sure I can be more succinct.)

I'm not sure this'll be helpful, but you might not have spotted them.

2012-04-18 07:10
by pms1969
Yes, I saw that too. That is effectively the same as setting TcpAckFrequecy = 1. Before I did this I was getting a really slow rate. Thanks though - JeffV 2012-04-18 12:32
No probs. You disabled your firewall - pms1969 2012-04-18 13:55
Yes, firewall is disabled - JeffV 2012-04-19 17:51
Ads