[zeromq-dev] perf/throughput tests calculates bandwith wrong

A. Mark gougolith at gmail.com
Mon Feb 25 14:41:26 CET 2013


Meant to write:

should be at least:

throughput = (unsigned long)((double) message_count / (double) elapsed *
(double)( 1024*1024));


On Mon, Feb 25, 2013 at 5:39 AM, A. Mark <gougolith at gmail.com> wrote:

> Hi,
>
> I've done some extensive benchmarks using local_thr and remote and tcp in
> the last couple of months and found some odd things. This line is slightly
> wrong for the throughput calculation ( apart from the overflow):
>
>
> throughput = (unsigned long)((double) message_count / (double) elapsed *
> 1000000);
>
> should be at least:
>
> throughput = (unsigned long)((double) message_count / (double) elapsed *
> double( 1024*1024));
>
> There are few more things to consider too that will effect performance,
> ZMQ_RCVBUF/ZMQ_SNDBUF/ZMQ_SNDHWM/ZMQ_RCVHWM.
> Also since ZMQ does buffering on the background :
> ZMQ_DELAY_ATTACH_ON_CONNECT can throw off your time measurement. With large
> buffers and many messages the programs will actually crash, as ZMQ runs out
> of memory queueing messages, I'm not sure if this is the intended behavior,
> but setting the HWMs  prevents that problem.
>
> I had posted the corrections and improvements for the two programs earlier
> to the mail list. Here is the improved versions of the local_thr and
> remote_thr again if you care to try some other options. There is also an mt
> version of the server.
>
> Mark
>
>
>
> On Mon, Feb 25, 2013 at 4:32 AM, Erik Hugne <erik.hugne at ericsson.com>wrote:
>
>> So, i now realize that the bw figures are actually in _megabit_..
>> and shortly after sending, obviously i found the problem.
>>
>> As i posted on IRC some moments ago:
>> [13:33] <haze_> it's an overflow on this line
>> [13:33] <haze_> throughput = (unsigned long)((double) message_count /
>> (double)
>>  elapsed * 1000000);
>> [13:33] <haze_> in local_thr
>> [13:33] <haze_> more specifically, (double) elapsed*1000000
>>
>>
>> //E
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130225/b3cbc6d4/attachment.html>


More information about the zeromq-dev mailing list