RFC 2762 (rfc2762) - Page 3 of 12
Sampling of the Group Membership in RTP
Alternative Format: Original Text Document
RFC 2762 RTP Sampling February 2000
This sampling process can be described mathematically as:
D = (K*M == S*M)
Where the * operator denotes AND and the == operator denotes a test
for equality. D represents the sampling decision.
According to the RTP specification, the SSRC's used by session
participants are chosen randomly. If the distribution is also
uniform, it is easy to see that the above filtering will cause 1 out
of 2**m SSRC's to be placed in the table, where m is the number of
bits in the mask, M, which are one. Thus, the sampling probability p
is 2**-m.
Then, to obtain an actual group size estimate, L, the number of
entries in the table N is multiplied by 2**m:
L = N * 2**m
Care must be taken when choosing which bits to set to 1 in the mask.
Although the RTP specification mandates randomly chosen SSRC, there
are many known implementations which do not conform to this. In
particular, the ITU H.323 [3] series of recommendations allows the
central control element, the gatekeeper, to assign the least
significant 8 bits of the SSRC, while the most significant are
randomly chosen by RTP participants.
The safest way to handle this problem is to first hash the SSRC using
a cryptographically secure hash, such as MD5 [4], and then choose 32
of the bits in the result as the SSRC used in the above computation.
This provides much better randomness, and doesn't require detailed
knowledge about how various implementations actually set the SSRC.
2.1 Performance
The estimate is more accurate as the value of m decreases, less
accurate as it increases. This can be demonstrated analytically. If
the actual group size is G, the ratio of the standard deviation to
mean of the estimate L (coefficient of variation) is:
sqrt((2**m - 1)/G)
This equation can be used as a guide for selecting the thresholds for
when to change the sampling factor, as discussed below. For example,
if the target is a 1% standard deviation to mean, the sampling
Rosenberg & Schulzrinne Experimental