Reputation: 496
Question about ZeroMQ profiling and debugging. I'm interested to find out two information for a 0MQ socket. 1) queue length and 2) the messages (# of messages and total message size).
Is there anyway we can monitor and log the above information in 0MQ sockets? Does 0MQ expose such counters? I think it quite useful for us to profile and debug the system that we build on top of 0MQ. We are using the C++ API. Thanks.
Upvotes: 0
Views: 371
Reputation: 1
The reason is that all the ZeroMQ maxims are doing their best to fine-tune internal mechanics so as to leave user-programs as free from the underlying duties as possible and minimise the service overheads and latencies.
One may, either, fork and add these user-side service management-plane layer into the core elements of the ZeroMQ data-pumps.
Next possible move is to stay within the as-is core implementation and just make each socket / queue connect and "run"-traffic through a simple, single purpose "gas-meter"-proxy, that would have none other duty, than to count bytes, messages ( and handle all the mechanics of the possible distribution / aggregation patterns the SUT-is using, so as to meter the 1:1 the flow ).
The costs of the former are much higher than of the latter, but the latter adds a way larger portion of end-to-end SUT-skew, as the "inserted" latencies are much higher and resources consumption grows both in ( SPACE ( {RX|TX}-HWM queues + buffers ) and TIME ( thread-count ).
Upvotes: 1