[zeromq-dev] Poor performance for DEALER <-> ROUTER - ROUTER <-> DEALER in hello_world scenario .

artemv zmq artemv.zmq at gmail.com
Fri May 23 16:48:27 CEST 2014


Panu Wetterstrand ,


Do u mean like this:

...
for (; ; ) {
  poller.poll(1000);
  if (poller.pollin(0)) {
    // block here and .recv() from socket until .recv() return null .
  }
}
...


Is this is what  you are proposing?


Thanks  for heads up /




2014-05-23 17:22 GMT+03:00 Panu Wetterstrand <panu.wetterstrand at iki.fi>:

> Sorry. Event count relates to sockets so that is fine but try to read
> until socket is empty and recv returns nil.
> 23.5.2014 17.16 kirjoitti "Panu Wetterstrand" <panu.wetterstrand at iki.fi>:
>
> You should handle all events before calling poll again. Poll returns event
>> count. Only with phone so cant write example.
>> 22.5.2014 21.21 kirjoitti "artemv zmq" <artemv.zmq at gmail.com>:
>>
>>> I'm following advice from a guide to come with
>>> as-simple-solution-as-possible before moving further, and experiencing poor
>>> performance on a very simple scenario.
>>>
>>> My test case is to check how ROUTER/DEALER constructions are working,
>>> how far they scale.  My environment:
>>>  windows_7_64bit/java7/4xCPU/8g/zmq-3.2.2/jzmq-3.0.0
>>>
>>> Got two java processes. One process(called Sender) hosts ROUTER-ROUTER
>>> device   and  forever-loop DEALER  constantly sending "hello zmq world"
>>>  message.  Second process(called Receiver) is hosting  single DEALER which
>>> is sort of simple worker -- receives message and sends it back.
>>>
>>> The whole point is measure how much messages per sec I can get at this
>>> very raw scenario. Here's java code:
>>>
>>> Sender -- http://pastebin.com/mM7dqvSw
>>> Receiver -- http://pastebin.com/dS2SLA2G
>>>
>>>
>>> The test result ~ 40K/sec  which is much-much less than I expected.
>>> Because you can't have two java processes (both taking 50% cpu)  and
>>> rendering 40K  at  "hello world"  scenario..
>>>
>>>
>>>
>>> Thanks in advance for a help.
>>>
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> zeromq-dev at lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>>>
> _______________________________________________
> 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/20140523/e93ff992/attachment.htm>


More information about the zeromq-dev mailing list