Hi all,<br><br>I'm having problems achieving a high publish throughput with RabbitMQ 2.2.<br><br>I am using the .NET client on two Win7/64 desktops with Core 2 duos, and the broker is running on RHEL5.6 (OTP R14B01) on a quad core Xeon blade, and the link between the blade and the desktops is 1Gb/s ethernet. <br>
<br>I created a minimal publisher and consumer in .NET and ran one on each machine. The consumer was able to receive more than 50 000 empty messages per second, however the publisher was only able to publish 5000 empty messages per second before maxing out my desktop's CPU. I ported the publisher to Java, and that went up to 10 000 per second, which is better but still not great. The network utilization is almost insignificant and the broker's CPU usage was around 10% on one core. The bottleneck appears to be CPU usage inside the RabbitMQ .NET library. I achieve at least 45MB/s throughput in a single plain TCP connection
from Win7 to the blade, so the link is definitely not the problem.<br><br>I attached a profiler to my publisher and I found that more than 90% of the CPU time was spent calling Flush in WriteFrame (called by BasicPublish). I created an alternate non-flushing code path in the RabbitMQ for BasicPublish, and the publishing speed went up to between 35 000 and 45 000 messages per second, and the messages still got to the client quickly.<br>
<br>Am I doing something incorrect? I presume the client flushes as soon as possible to reduce latency, but in this case, I don't mind giving up some latency to get better throughput, such as by only explicitly flushing once every 50ms or something along these lines. Is there a way to support my requirements with the RabbitMQ .NET library?<br>
<br>Thanks!<br clear="all">Cameron Harris<br>