[zeromq-dev] ZMQ 2.1.0 and OpenPGM Memory Usage

Bob Beaty bobbeaty at comcast.net
Mon Dec 6 17:44:37 CET 2010

  I am implementing this change to the ZeroMQ project, and have run into a slight snag... I can't find any reference to the variable 'tpdu_size' in the codebase. I can find a method called get_max_tsdu_size(), which is really a call to:

  pgm_getsockopt(sock, IPPROTO_PGM, PGM_MSS, &max_tsdu, &optlen)

but it's not clear to me that I should be using that as the "size" of a message. And that's what your equation is saying to me - "take the byte rate and time, and divide by the size of a message" to get the sequence number count.
  So I asked Martin and he said to ask you.
  So I'm asking.
  What I've read in the RFC3208 is that the TPDU size is the TH (transport header) size plus the TSDU (available from the get_max_tsdu_size()?) size. I'm not sure exactly how to work this out, and any help you can provide me would be greatly appreciated.


On Dec 6, 2010, at 7:28 AM, Martin Sustrik wrote:

> Hi Bob,
>>    Underlying library (OpenPGM) accepts the value in granularity of
>>    seconds.
>>    Steven, is there any rationale for that?
>> I think I remember querying about it before.  Seconds is an easy default
>> option to use until someone really needs anything else.  Now someone is
>> asking for it.
>> Easy workaround is to calculate the buffer size in sequence numbers in
>> 0MQ and pass that onto OpenPGM.  Then you can export socket options for
>> 0MQ to set the buffer size in seconds, milliseconds, etc.
>> int sqns = (secs * max_rte) / tpdu_size;
>> pgm_setsockopt (sock, IPPROTO_PGM, PGM_TXW_SQNS, &sqns, sizeof (sqns));
> This seems like a viable solution. Does that work for you?
> Martin

        Bob (drbob at TheManFromSPUD.com)
    The Man from S.P.U.D.
    We will write no code before it's designed.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101206/dd9b57ce/attachment.htm>

More information about the zeromq-dev mailing list