[zeromq-dev] [PATCH] ypipe cache line alignment
Martin Sustrik
sustrik at 250bpm.com
Fri Apr 29 17:20:41 CEST 2011
On 04/29/2011 03:39 PM, Martin Pales wrote:
> On Fri, Apr 29, 2011 at 8:19 AM, Martin Sustrik <sustrik at 250bpm.com
> <mailto:sustrik at 250bpm.com>> wrote:
>
> Have you tried the latency test?
>
> The throughput is pretty volatile metric, not very good for
> benchmarking.
>
>
> I haven't yet, but I am not sure if I get much different results.
>
> I think that in my simple testcases where I am sending the same
> message multiple times between several threads in a single process
> the latency and throughput are actually just 2 different views at the
> same data.
>
> Or am I mistaken?
The two are pretty different metrics. In this case the main point is
that with throughput test the messages are batched and sent further on
just once in a while. Thus the actual "sending" code's cost is
minimised. The most of the work has to do with batching.
With latency test there's only one message being passed at a time, so
there's no batching involved and all the work done has to do with actual
"sending".
Aside of that, latency metric is much more stable (doesn't produce
random fluctuance) and thus much better suited for benchmarking.
Martin
More information about the zeromq-dev
mailing list