[zeromq-dev] Efficiency for very few short messages

Claudio Carbone erupter at libero.it
Mon Jan 21 02:25:23 CET 2013


Hi Dan.

What is the time it takes to solve a single equation?

it all depends on how you coded your app: there is a fixed calculation that pertains only to the multi threaded version, fixed means that it doesn't scale.
So when the iterations are so many, your fixed amount of time doesn't affect the total length; when your iterations are few, this time surpasses and overtakes the actual calculation time.

Have you measured how long it takes to get all the zmq context and sockets setup? How much it takes to get ready to churn numbers?

Maybe it's that part that comes down as the most relevant when you process few equations.

Claudio
-- Sent from my ParanoidAndroid Galaxy Nexus with K-9 Mail.

dan smith <dan25311 at gmail.com> wrote:

>Dear All,
>
>I have got a multi threading application. It uses a pool of threads.
>Each
>thread in the pool communicates with the main thread via ZMQ_PAIR
>sockets,
>one pair for each thread. The length of the messages is 8 bytes
>(pointer to
>a     C++ object). On a quad core machine I use 8 threads. Each thread
>in
>the pool solves a linear equation system (a small one, still the
>solution
>time is much larger than the time needed for the communication between
>the
>main thread and a worker).
>
>The speedup is perfect...if large number of equations are solved.
>However,
>the requirement is to solve just 8 equations parallel, one in each
>thread
>at the same time. If I decrease the number of equations below ~100, the
>serial solution becomes much faster than the multi core solution.
>
>Why is that and how this problem can be solved? How can a multi core
>application be made efficient for small problems too?
>
>Thank you very much in advance,
>
>Danny
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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/20130121/b79c9d65/attachment.htm>


More information about the zeromq-dev mailing list