Hi Doron,
 
> You cannot throttle the getsockopt of ZMQ_EVENTS.
> As you should only throttle from within recv & send.
 
> My suggestion is, to write the proxy code by hand, the trick to get maximum performance is to call zmq_recv with DONT_WAIT flag until you get EAGAIN.
> So when the zmq_poll signal that a socket is ready for reading you read as much as you can.
> That way, you don't call the process_commands as often.
 
I will patch the zmq code to use the zmq_recv with DONT_WAIT in the forward() function.
But in your opinion what should be done when the output socket (named to_ in the source code) is touching the HWM and exiting with EAGAIN? Should I keep retrying the send() until it is successful?
Moreover I am trying to implement a benchmark utility of the proxy throughput to keep track of the performance enhancement (if any). Do you think this could be a useful addition in libzmq/perf ? I see there are not benchmarks for zmq proxy...
 
Regards,
Claudio
 
_______________________________________________
zeromq-dev mailing list
[email protected]
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to