[zeromq-dev] Odd numbers with zeromq
Paul Colomiets
paul at colomiets.name
Wed Sep 19 10:16:07 CEST 2012
HI Maninder,
On Wed, Sep 19, 2012 at 6:21 AM, Maninder Batth <whatpuzzlesme at gmail.com> wrote:
> Paul,
> With messages being sent one way, via pub and sub sockets, i am getting a
> very decent performance. About 80% of our network gets saturated.
> The code is zserver.cpp and zclient.cpp
>
> But if i configure the software such that client only sends the next
> message, after it has received a response from the server, the throughput
> is really bad.
> The code is zserver-ack1.cpp and zclient-ack1.cpp
> The difference is that in the former case, i can get 110k messages per
> second , whereas in the latter case, i can only get 1k messages per second.
> The sockets that i use in latter case are of type REQ and REP. Am i using
> wrong sockets type ?
>
1. Measure latency (time for single roundtrip). If roundtrip is about
1ms (which is ok for most networks i think) then you can certainly do
no more than 1k roundtrips per second
2. You can saturate bandwidth with multiple clients (even if you need
110 ones, each client can be an asynchronous one)
3. You will saturate bandwidth with larger messages (and at least two
clients if that's full duplex network :) )
--
Paul
More information about the zeromq-dev
mailing list