Martin, most of my problems got solved by
a) using nanosleep() - stopped the cpu spikes b) in the subscriber receive loop switching to zmq_poll() and doing a msg_init and msg_close before and after the zmq_recv() c) on the publisher side, using msg_init_data() with a noop_free() that allows me to reuse the data buffer again and overwrite the fields for msg index and send timestamp however there is still a subtle monotonic memory growth that I'm seeing on the subscriber side. the messages on the sub have been drained and even msg_close'd. in an hour's run, the subscriber process (with 4 sub sockets and receiving a 1000 msgs/sec of msg size: 2048 bytes) memory monotonically grows to about 1Mb from starting memory footprint of 200 Kb. even after i kill the publisher process, the subscriber process memory doesn't come down. I strongly suspect this might be a bug in my benchmark code and will share the minimal testcase, once I've valgrind'd the heck out of that piece of code :) --Saurav
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
