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

Goswin von Brederlow goswin-v-b at web.de
Fri May 23 15:26:15 CEST 2014


On Thu, May 22, 2014 at 09:20:39PM +0300, artemv zmq wrote:
> 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.

And now do the same in C and see how much faster that is.

I suspect the multiple copies you make of every message and constant
allocations and freeing costs you.

MfG
	Goswin



More information about the zeromq-dev mailing list