If you want to acknowledge a msg but each msg is independent of each other, use Router/dealer. There is nothing else you can do.
2012/9/19 Bennie Kloosteman <[email protected]> > If you wait for responses you have to wait on latency which can get much > worse eg international 250ms your limit is 4 messages per second. You > cannot do better > > That why people build asynch systems...and why Doom/Quake use to spam UDP > position updates - without waiting for an answer. > > Ben > > > On Wed, Sep 19, 2012 at 11:21 AM, Maninder Batth > <[email protected]>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 ? >> >> >> >> On Tue, Sep 18, 2012 at 9:38 PM, Maninder Batth >> <[email protected]>wrote: >> >>> Paul, >>> Thank you again for your help. Now with message copying, i am getting a >>> throughput of .8Gb, which is what i would have expected on a 1Gb network. >>> >>> >>> On Tue, Sep 18, 2012 at 4:20 PM, Paul Colomiets <[email protected]>wrote: >>> >>>> Hi Maninder, >>>> >>>> On Tue, Sep 18, 2012 at 10:21 PM, Maninder Batth >>>> <[email protected]> wrote: >>>> > Paul, >>>> > Here is number of messages as seen by the server in one second. Each >>>> message >>>> > is 1024 byte excluding tcp/ip and zmq headers. Based on these numbers >>>> and i >>>> > am getting a throughput of 1.4 Gb/sec. >>>> > Enclosed is the source code for the server and the client. >>>> > >>>> >>>> Zeromq closes the message after sending. So you effectively send >>>> messages of the zero length after first one. You should use >>>> zmq_msg_copy (or whatever C++ API is there) before doing send() in >>>> case you want to reuse message. >>>> >>>> -- >>>> Paul >>>> _______________________________________________ >>>> zeromq-dev mailing list >>>> [email protected] >>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>>> >>> >>> >> >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -- Sincerely yours, Apostolis Xekoukoulotakis
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
