[zeromq-dev] Question about zeromq throughput benchmarks.

Pieter Hintjens ph at imatix.com
Fri Mar 28 23:16:38 CET 2014


10,000 messages is often too little to get significant results. Try
sending 2M small messages...

zmq_send copies the data, which for large messages costs more.

On Fri, Mar 28, 2014 at 10:20 AM, Alexander V Vershilov
<alexander.vershilov at gmail.com> wrote:
>
>
> On 27 March 2014 16:48, Charles Remes <lists at chuckremes.com> wrote:
>>
>> On Mar 27, 2014, at 4:41 AM, Alexander V Vershilov
>> <alexander.vershilov at gmail.com> wrote:
>>
>> Hi,
>>
>> I'm trying to write a small benchmark program using zeromq-4.0.4 that will
>> be used as a
>> prototype for higher level library. Test program creates a pair of
>> asynchronous sockets and
>> send a bunch of messages with no acknowledgement and a the end reads a
>> reply.
>>
>>
>> Surprisingly, this test program does not compare favourably with an
>> equivalent direct
>> implementation over TCP. I have the following timings for sending 10,000
>> messages of the
>> given size on the localhost:
>>
>>
>> This is surprising.
>>
>>
>> Is there something I am misunderstanding here? I have gone through several
>> `iterations of
>> my benchmarks, but perhaps you can point out any problem with it?
>>
>>
>>
>> Have you tried comparing your results to the built-in local_lat/remote_lat
>> and local_thr/remote_thr benchmark programs? You could easily modify the
>> throughput benchmark to use PUSH/PULL sockets and see if the results differ
>> wildly from the pub/sub results.
>
>
>
> I've tried the tests from local_thr/remote_thr they are also use PUSH/PULL
> socket pair. The only difference is that
> that benchmarks are preparing message 'zmq_msg_init_size' and then
> 'zmq_sendmsg', while in my
> benchmark I'm just using zemq_send, this better reflect TCP case. New
> variant  gives me extra ~2-10kMb/s depending
> on the message size. However TCP is still faster, except very big messages
> where it's on par with ZeroMQ.
>
> Thanks.
>
> --
> Alexander Vershilov
>   mail-to: alexander.vershilov at tweag.io
>
> _______________________________________________
> 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