Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Bit-rate Selection Algorithms

802.11a, b, and g, have multiple bitrates (like 1Mbps, 6Mbps, 54Mbps, etc) from which transmitters can choose when sending data. Higher bit-rates allow high quality links to transmit more data, but suffer from loss on many links. Lower bit-rates, in general, have a lower loss probability and can transmit data over more links. Each link may have multiple bit-rates that deliver packets, and the throughput a particular bit-rate achieves is a function of the bit-rate and delivery probability. A few different algorithms that choose the bit-rate for each packet are included in madwifi; In the current driver, there are three available:

onoe

A simple, robust algorithm that decreases the bit-rate when packets, on average, need at least 1 retry. Increases the bit-rate when less than 10% of packets require a retry. It performs very well in indoor 802.11b environments.

amrr

Uses binary exponential backoff to avoid attempting to increase the bit-rate too often. It was conceived for high latency systems.

For more info, read http://www-sop.inria.fr/rapports/sophia/RR-5208.html (local copy)

sample

SampleRate chooses the bit-rate it predicts will provide the most throughput based on estimates of the expected per-packet transmission time each bit-rate. SampleRate periodically sends packets at bit-rates other than the current one to estimate when another bit-rate will provide better performance.

You can find some statistics on the operation of the sample rate control in /proc/net/madwifi/ath?/ratestats_{250,1600,3000}. The ratestats_* files contain the stats used to make the decisions. The algorithm is estimating the amount of medium required to transmit a packet at each of the bit-rates. Since the loss rate is also a function of packet size, it gathers statistics for 250, 1600, and 3000 byte packets. So ratestats_1600 for example represents the loss rates for packets of sizes between 251 and 1600 bytes. So if you are sending mostly 1500 byte Ethernet packets you would be interested mostly in the ratestats_1600 proc entry.

Failed/pkts means the number of packets that failed out of the total number of packets sent (at that bit-rate). So if you transmit a packet and receive an ack it would be 0/1. If you transmit a packet 3 times, and then only get an ack on the forth retransmission it would be 3/4.

Average Tries means how many times on average you need to send the packet at the bit-rate before receiving an ack. If the success rate is 100% then average tries = 1. If the success rate is 50% then average tries is about 2.

For more info, read http://www.pdos.lcs.mit.edu/papers/jbicket-ms.pdf (local copy)

Bit-rate Selection Algorithm comparison

A comparison of different algorithms can be found in John Bicket's paper (local copy) as well.

Configuration

Currently the default algorithm is ath_rate_sample; most users say it provides the highest throughput and it performs well even on lossy links where other algorithms may have trouble selecting the bit-rate with the highest throughput. To change it, edit the following line in Makefile.inc:

ATH_RATE=ath_rate/sample

Or call make like this:

make ATH_RATE=ath_rate/sample

You can, of course, substitute sample with amrr or onoe as appropriate for your desired configuration.

Attachments