linux/net/dccp/ccids/lib
Gerrit Renker 22338f09bd dccp tfrc: Increase number of RTT samples
This improves the receiver RTT sampling algorithm so that it tries harder to get
as many RTT samples as possible. 

The algorithm is based the concepts presented in RFC 4340, 8.1, using timestamps
and the CCVal window counter. There exist 4 cases for the CCVal difference:
 * == 0: less than RTT/4 passed since last packet -- unusable;
 *  > 4: (much) more than 1 RTT has passed since last packet -- also unusable;
 * == 4: perfect sample (exactly one RTT has passed since last packet);
 * 1..3: sub-optimal sample (between RTT/4 and 3*RTT/4 has passed).

In the last case the algorithm tried to optimise by storing away the candidate
and then re-trying next time. The problem is that
 * a large number of samples is needed to smooth out the inaccuracies of the
   algorithm;
 * the sender may not be sending enough packets to warrant a "next time";
 * hence it is better to use suboptimal samples whenever possible.
The algorithm now stores away the current sample only if the difference is 0.

Applicability and background
----------------------------
A realistic example is MP3 streaming where packets are sent at a rate of less
than one packet per RTT, which means that suitable samples are absent for a
very long time.

The effectiveness of using suboptimal samples (with a delta between 1 and 4) was
confirmed by instrumenting the algorithm with counters. The results of two 20
second test runs were:
 * With the old algorithm and a total of 38442 function calls, only 394 of these
   calls resulted in usable RTT samples (about 1%), and 378 out of these were
   "perfect" samples and 28013 (unused) samples had a delta of 1..3.
 * With the new algorithm and a total of 37057 function calls, 1702 usable RTT
   samples were retrieved (about 4.6%), 5 out of these were "perfect" samples.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
2008-09-04 07:45:42 +02:00
..
loss_interval.c dccp tfrc: Return type of update_i_mean is void 2008-09-04 07:45:41 +02:00
loss_interval.h dccp tfrc: Return type of update_i_mean is void 2008-09-04 07:45:41 +02:00
Makefile [TFRC]: Provide central source file and debug facility 2008-01-28 14:56:39 -08:00
packet_history.c dccp tfrc: Increase number of RTT samples 2008-09-04 07:45:42 +02:00
packet_history.h dccp ccid-3: Always perform receiver RTT sampling 2008-09-04 07:45:41 +02:00
tfrc_equation.c dccp tfrc: Suppress unavoidable "below resolution" warning 2008-09-04 07:45:40 +02:00
tfrc.c dccp: Toggle debug output without module unloading 2008-09-04 07:45:25 +02:00
tfrc.h dccp tfrc/ccid-3: Computing Loss Rate from Loss Event Rate 2008-09-04 07:45:34 +02:00