Hi, a small update on the situation, I've re-run tests on a machines that are far away from each other, and results were better, ZeroMQ works as fine as TCP there. So I think my questions is closed.
-- Alexander. On 30 March 2014 20:20, Alexander V Vershilov <[email protected]> wrote: > Latest code is exactly the same as in benchmarks (local_thr/remote_the from > ZeroMQ 4.0.4 tarball), really I'm reusing it now. TCP code is attached in > the first message. > > On Mar 30, 2014 8:16 PM, "Charles Remes" <[email protected]> wrote: >> >> Share your newest code with the list. Maybe someone will run it and >> identify further improvements. >> >> >> On Mar 30, 2014, at 9:28 AM, Alexander V Vershilov >> <[email protected]> wrote: >> >> I have tried 2M messages the result is roughly the same (as in second >> letter), i.e. TCP outperform ZMQ Push->Pull in maximum 2 times, and on >> extreme size results are the same. Its possible that I've made some mistake >> in TCP so the programs are not equivalent. >> >> However I didn't try to optimize any zmq or kernel options. >> >> So now difference looks OK to use ZeroMQ in my program. But if there is a >> room for additional optimizations or better patterns it will be very good. >> >> -- >> Alexander >> >> On Mar 29, 2014 2:17 AM, "Pieter Hintjens" <[email protected]> wrote: >>> >>> 10,000 messages is often too little to get significant results. Try >>> sending 2M small messages... >>> >>> zmq_send copies the data, which for large messages costs more. >>> >>> On Fri, Mar 28, 2014 at 10:20 AM, Alexander V Vershilov >>> <[email protected]> wrote: >>> > >>> > >>> > On 27 March 2014 16:48, Charles Remes <[email protected]> wrote: >>> >> >>> >> On Mar 27, 2014, at 4:41 AM, Alexander V Vershilov >>> >> <[email protected]> wrote: >>> >> >>> >> Hi, >>> >> >>> >> I'm trying to write a small benchmark program using zeromq-4.0.4 that >>> >> will >>> >> be used as a >>> >> prototype for higher level library. Test program creates a pair of >>> >> asynchronous sockets and >>> >> send a bunch of messages with no acknowledgement and a the end reads a >>> >> reply. >>> >> >>> >> >>> >> Surprisingly, this test program does not compare favourably with an >>> >> equivalent direct >>> >> implementation over TCP. I have the following timings for sending >>> >> 10,000 >>> >> messages of the >>> >> given size on the localhost: >>> >> >>> >> >>> >> This is surprising. >>> >> >>> >> >>> >> Is there something I am misunderstanding here? I have gone through >>> >> several >>> >> `iterations of >>> >> my benchmarks, but perhaps you can point out any problem with it? >>> >> >>> >> >>> >> >>> >> Have you tried comparing your results to the built-in >>> >> local_lat/remote_lat >>> >> and local_thr/remote_thr benchmark programs? You could easily modify >>> >> the >>> >> throughput benchmark to use PUSH/PULL sockets and see if the results >>> >> differ >>> >> wildly from the pub/sub results. >>> > >>> > >>> > >>> > I've tried the tests from local_thr/remote_thr they are also use >>> > PUSH/PULL >>> > socket pair. The only difference is that >>> > that benchmarks are preparing message 'zmq_msg_init_size' and then >>> > 'zmq_sendmsg', while in my >>> > benchmark I'm just using zemq_send, this better reflect TCP case. New >>> > variant gives me extra ~2-10kMb/s depending >>> > on the message size. However TCP is still faster, except very big >>> > messages >>> > where it's on par with ZeroMQ. >>> > >>> > Thanks. >>> > >>> > -- >>> > Alexander Vershilov >>> > mail-to: [email protected] >>> > >>> > _______________________________________________ >>> > 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 >> >> >> >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > -- Alexander _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
