[zeromq-dev] perf/throughput tests calculates bandwith wrong
A. Mark
gougolith at gmail.com
Mon Feb 25 14:39:23 CET 2013
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/a3553c5d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: local_thr2.cpp
Type: text/x-c++src
Size: 7572 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130225/a3553c5d/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remote_thr2.cpp
Type: text/x-c++src
Size: 7636 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130225/a3553c5d/attachment-0001.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtserver_zmq.cpp
Type: text/x-c++src
Size: 10363 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130225/a3553c5d/attachment-0002.cpp>
More information about the zeromq-dev
mailing list