Pathrate tutorial

Pathrate is an end-to-end capacity measurement tool.
  1. What is end-to-end network capacity
  2. What is Pathrate
  3. How to build and run Pathrate
  4. How does Pathrate work
  5. Test runs for Pathrate
  6. References
  7. Disclaimer

1. What is end-to-end network capacity

The capacity of a path, a.k.a. bottleneck bandwidth, is the maximum IP-layer throughput that a flow can get in the network path from a sender S to a receiver R. The capacity does not depend on the load of the path. The route that the path follows must be unique and should remain constant during the measurements. The capacity of the path is determined by the link with the minimum transmission rate. We refer to that link as the narrow link of the path.

2. What is Pathrate

Pathrate is an end-to-end capacity estimation tool. It uses packet-pairs and packet-trains (a.k.a. `packet dispersion' methods), in conjunction with statistical techniques, to estimate the capacity of the narrow link in the path.

Pathrate requires the user to have access at both ends of the path (i.e., you have to be able to run Pathrate at both S and R). It uses UDP packets for the packet-pairs and packet-trains, as well as a TCP connection for exchange of control information. It can be run from user-space, and it does not require superuser privileges.

3. How to build and use Pathrate

3.1 To build Pathrate :
Unpack the tar ball. Change directory to pathrate_x.y.z . Run "configure" and then run "make".
     $gunzip pathrate_x.y.z.tar.gz
     $tar xvf pathrate_x.y.z.tar
     $cd pathrate_x.y.z
     $./configure
     $make
The two executables that will be created, are:
  1. pathrate_snd (to be run at the sender S)
  2. pathrate_rcv (to be run at the receiver R)
3.2 To run Pathrate :
To run Pathrate , first run pathrate_snd at the source of the path S:
        $pathrate_snd

By default, pathrate_snd will exit after 1 measurement.
Use switch -i to run sender in iterative mode.
Other options are,

        -q          : quite mode
        -v          : verbose mode
        -o < file > : print log in user specified file
        -H|-h       : print help and exit
and then run pathrate_rcv at the destination of the path R:
        $pathrate_rcv -s sender_address
Options for receiver are :
        -s          : hostname/ipaddress of sender
        -q          : quite mode
        -v          : verbose mode
        -Q          : Quick termination mode
        -o < file > : print log in user specified file
        -O < file > : append log in user specified file [default is pathrate.output]
        -N < file > : print output in ULM format to 
        -H|-h       : print help and exit
The argument sender_address is the name or ip address of host S. If, for example, you want to measure the capacity from a host abc.foo1.com to a host xyz.foo2.com, run
     abc.foo1.com$pathrate_snd -i -q
and then run
     xyz.foo2.com$pathrate_rcv -s abc.foo1.com
You can let the sender running at the background. Note, however, that the sender will only accept one receiver at a time.

It is important to run Pathrate from relatively idle hosts. Before running Pathrate , make sure that there are no other CPU or I/O intensive processes running. If there are, it is likely that they will interfere with Pathrate's user-level packet timestamping and render the measurements inaccurate.

4. How does Pathrate work

Pathrate consists of the following "run phases":
4.1 Initial Phase
Initially, the tool discovers the maximum train-length that the path can carry. The idea is that we do not want to overload the path with very long packet trains that would cause buffer overflows and losses.

Then, Pathrate sends a few packet trains of increasing length (called "preliminary measurements"). The goal here is to detect if the narrow link has parallel sub-channels, or if it performs traffic shaping. This phase also checks whether the path is "easy to measure" (very lightly loaded). In that case, Pathrate reports its final estimate and exits. This is called quick termination mode. An important objective of these preliminary measurements is to measure the bandwidth resolution (think of this as the bin width of a histogram). The final capacity estimate will be a range of this width.

4.2 Phase I
In this phase, Pathrate generates a large number (1000) of packet-pairs. The goal here is to discover all local modes in the packet-pair bandwidth distribution. One of the Phase I modes is expected to be the capacity of the path. The packets that Pathrate sends in Phase I are of variable size, in order to make the non-capacity local modes weaker and wider.
4.3 Phase II
In phase II, we estimate the Asymptotic Dispersion Rate (ADR) metric R, measured from the dispersion of long packet trains. We know that the capacity is larger than R. If there are several Phase I modes that are larger than R, the capacity estimate is the mode that maximizes a certain "figure of merit" M. M depends on the width and strength of each local mode in the underlying bandwidth distribution of Phase I. The capacity mode is expected to be narrow and strong, i.e., to have a large value of M.

The very final outcome of Pathrate is the capacity estimate for the path.

Pathrate stores all intermediate results in the file "pathrate.output". If you don't want to get all the intermediate measurements at the receiver's stdout, use -q flag. I suggest you do that if you run the receiver remotely and the capacity of the path is just a few kbps. The reason is that the telnet/ssh traffic can interfere with Pathrate 's measurements.

5. Test runs

A) From "altair.cc.gatech.edu" to "argon.caida.org"

At the sender side:
altair.cc.gatech.edu$./pathrate_snd -i -q &

At the receiver side
./pathrate_rcv -s altair -o test.out 
	pathrate run from altair.cc.gatech.edu to utah.ron.lcs.mit.edu on Wed Apr  9 22:26:05 2003
	--> Average round-trip time: 41.1ms


	--> Capacity Resolution:  2.1 Mbps 


-- Phase I: Detect possible capacity modes -- 

	-> Train length:  2 - Packet size:  600B ->  0% completed
	-> Train length:  3 - Packet size:  898B ->  2% completed
	-> Train length:  4 - Packet size: 1196B ->  5% completed
	-> Train length:  4 - Packet size: 1219B ->  7% completed
	-> Train length:  4 - Packet size: 1242B -> 10% completed
..............................................................
..............................................................
	-> Train length:  4 - Packet size: 1488B -> 87% completed
	-> Train length:  4 - Packet size: 1488B -> 90% completed
	-> Train length:  4 - Packet size: 1488B -> 92% completed
	-> Train length:  4 - Packet size: 1488B -> 95% completed
	-> Train length:  4 - Packet size: 1488B -> 97% completed


-- Local modes : In Phase I --
	* Mode: 103 Mbps to 105 Mbps  - 134 measurements
	  Modal bell: 705 measurements - low : 90 Mbps - high : 116 Mbps 
	* Mode: 140 Mbps to 142 Mbps  - 20 measurements
	  Modal bell: 50 measurements - low : 136 Mbps - high : 143 Mbps 



-- Phase II: Estimate Asymptotic Dispersion Rate (ADR) -- 

	-- Number of trains: 500 - Train length: 48 - Packet size: 1488B

-- Local modes : In Phase II --
	* Mode: 96 Mbps to 98 Mbps  - 298 measurements
	  Modal bell: 478 measurements - low : 91 Mbps - high : 102 Mbps 
-------------------------------------------------
Final capacity estimate :  96 Mbps  to  98 Mbps  
-------------------------------------------------
For more verbose output use -v flag.
To suppress any output on stdout use -q flag.
Use of -N < file > will report final result in Netlogger compatible ULM format.

B) From "altair.cc.gatech.edu" to "jawks.cc.gatech.edu"

At the receiver host in the case of "Quick termination"

./pathrate_rcv -s altair -v -o test.out 
  pathrate run from altair to jawks on Wed Apr  9 18:07:11 2003
  --> Average round-trip time: 0.3ms

--> Minimum acceptable packet pair dispersion: 15 usec

-- Maximum train length discovery -- 
	Train length: 2 ->	 98 Mbps 
	Train length: 3 ->	 65 Mbps 
	Train length: 4 ->	 98 Mbps 
	Train length: 5 ->	 98 Mbps 
	Train length: 6 ->	 98 Mbps 
..............................................................
..............................................................
	Train length: 36 ->	 98 Mbps 
	Train length: 40 ->	 94 Mbps 
	Train length: 44 ->	 97 Mbps 
	Train length: 48 ->	 98 Mbps 
	--> Maximum train length: 48 packets 


--Preliminary measurements with increasing packet train lengths--
  Train length: 2 ->  98 Mbps  90 Mbps  98 Mbps  99 Mbps  98 Mbps  87 Mbps  98 Mbps 
  Train length: 3 ->  98 Mbps  97 Mbps  88 Mbps  108 Mbps  98 Mbps  98 Mbps  46 Mbps 
  Train length: 4 ->  98 Mbps  86 Mbps  98 Mbps  98 Mbps  98 Mbps  96 Mbps  98 Mbps 
  Train length: 5 ->  98 Mbps  98 Mbps  98 Mbps  99 Mbps  99 Mbps  98 Mbps  98 Mbps 
  Train length: 6 ->  91 Mbps  98 Mbps  98 Mbps  100 Mbps  94 Mbps  98 Mbps  98 Mbps 
  Train length: 7 ->  97 Mbps  81 Mbps  98 Mbps  98 Mbps  98 Mbps  83 Mbps  84 Mbps 
  Train length: 8 ->  98 Mbps  98 Mbps  97 Mbps  98 Mbps  97 Mbps  98 Mbps  95 Mbps 
  Train length: 9 ->  98 Mbps  98 Mbps  98 Mbps  98 Mbps  98 Mbps  98 Mbps  98 Mbps 
  Train length: 10 ->  98 Mbps  98 Mbps  97 Mbps  96 Mbps  98 Mbps  97 Mbps  98 Mbps 

	--> Capacity Resolution:  718 kbps 
`Quick-termination' - Sufficiently low measurement noise

--> Coefficient of variation: 0.030 


-------------------------------------------------
Final capacity estimate :  96 Mbps  to  97 Mbps 
-------------------------------------------------
Receiver can be force to exit at this point by use of -Q flag.
A high value of coefficient of variation suggests a complete run of Pathrate to get better accuracy.

7. References

  1. What do packet dispersion techniques measure?
    C. Dovrolis, P. Ramanathan and D. Moore
    Proceedings of IEEE Infocom 2001.
    Note that this paper describes the first version of Pathrate (pathrate 1.x).

  2. Packet dispersion techniques and bandwidth estimation
    C. Dovrolis, P. Ramanathan and D. Moore
    Extended version of the previous paper that includes additional results.
    Note that this paper describes the second version of Pathrate (pathrate 2.x).

8. Disclaimer

Pathrate is based on statistical techniques, and so there is no guarantee that it will always estimate the correct capacity value. If you get wrong results, please let us know including the corresponding pathrate.output file.