Wireless Rate Adaptation NOTE

[近日查阅资料的随笔记录]


Atheros硬件允许用户创建 9个发送 FIFIO描述符,对发送进行调度;每个发送描述符包含了发送状况,数据的指针和长度,并且包含了一个 4对的“速率 /重传次数”对 (r0/c0, r1/ c1 r2/c2 r3/c3)

当无线信道可以发送的时候,硬件将引发处于 FIFO头的数据的发送,首先以速率 r0发送,如果发送失败,继续以速率 r0发送 c0-1次,然而再次以速率 r1发送,如果发送失败,继续以速率 r1发送 c1-1次……如果发送失败了 c0+c1+c2+c3次,那么放弃这次发送。

当发送完毕,或者发送放弃,硬件会在发送描述符中报告本次发送丢失的 ACK的数目,因此,通过获知丢失的 ACK的数目可以间接的得到本次的发送速率。

MadWiFi的这个机制称为 Multi Rate Retry mechanism


 



ONOE:


This is a credit based Rate Control Algorithm where the values of the credit is determined by the frequency of successful , erroneous and retransmissions accumulated during a fixed invocation period of 1000ms. If less than 10 percent of the packets need to be retransmitted at a particular rate, Onoe keeps increasing its credit point till the threshold value of 10 is reached. At this point the current transmission rate is increased to the next

available higher rate and the process is repeated with credit score of zero. Similar logic holds for deducting the credit score and moving to a lower bit rate for failed packets.


The Onoe algorithm is much less sensitive to individual packet failure than the ARF algorithm, and basically tries to find the highest bit-rate that has less than 50% loss rate.

Onoe对每个包的失败与否不敏感,试图找到丢贞率小于 50%的最高速率。


对每个目的连接, onen保存了一个当前链路的比特率、该比特率的信用度。算法跟踪每个链路当前比特率的信用度。如果丢包率小,则尝试增加信用度;如果信用度大到了一定阈值,则尝试增加速率;如果发生一些错误,则将信用度复位,速率下降。


When packets are fist sent to a destination, Onoe sets the initial bit-rate to 24 megabits in 802.11g and 802.11a, and 11 megabits in 802.11b.

第一次发送到目的地址的时候,将初始速率设置为 24M(802.11a/g)或者 11M(802.11b).


1.If no packets have succeeded, move to the next lowest bit-rate and return.

如果没有数据发送成功,降低到下一个速率。


2.If 10 or more packets have been sent and thr average number of retries per packet was greater than one, move to the next lowest bit-rate and return.

如果发送了 10个以上的包,并且每个包的重传次数大于 1,降低到下一个速率。


3.If more than 10% of the packets needed a retry, decrement the number of credits(but don't let it go below 0) and return.

如果超过 10%的包需要重传,将信用值减小 (但要保持大于 0)


4.If less than 10% of the packets needed a retry, increment the number of credits.

如果少于 10%的包需要重传,增加信用值。


5.If the current bit-rate has 10 or more credits, increase the bit-rate and return.

如果信用值大于 10,增加速率。


c1=4, c2=c3=c4=2




AMRR :


This algorithm uses Binary Exponential Backoff technique to adapt the length of the sampling period used to change the values of bit-rate and transmission count parameters. It uses probe packets and depending on their transmission status adaptively change the threshold value. The adaptation mechanism ensures fewer failures and higher throughput by not switching to a higher rate as specified by the back off mechanism.


AMRR onoe 的改进,使用了二进制避退 (BEB) 的概念,来适应改变 m/cn 的周期。为了适应快速变化的无线信道,设置 c0=c1=c2=c3=1 ,速率 r3 为最小可用速率 (6M @ 802.11a) ,而 r1 r2 分别是 r0 的下一个和下下个速率。因此,核心是改变 r0

AMRR 使用了一个定时器来周期性的进行速率控制,时间设置为 1 秒。


 



Sample:


It decides on the transmission rate based on the past history of performance; it keeps a record of the number of successive failures, the number of successful transmits and the total transmission along with the destination for that bit-rate. Stale samples are removed based on a EWMA windowing mechanism. If in the sampling process, no successful acknowledgment is received or the number of packets sent is multiple of 10 on a specific

link, it transmits packets with the highest rate which has not failed for 4 successive times.


该算法周期性地发送其他速率的包进行探询,看其他速率发送是否合适。

它认为速率选择算法需要考虑以下几个方面:

1. 不能认为如果某低速率性能差,那么比它高一级的速率性能会更差。

2. 最高吞吐量的算法可能丢包率也多,丢包率小的速率可能吞吐量未必最高。

3. 链路状态是会发生变化的,不能对链路状态进行反映,会导致低的吞吐量。

4. 速率选择算法必须要高效,不能尝试所有的速率。


SampleRate is implemented in three functions:

  1. apply_rate(),which assigns bit-rate to a packet;

  2. process_feedback(), which updates the link statistics based on the number of retries a packet used and whether the packet was successfully acknowledged;

  3. remove_stale_results(), which removes results from the transmission results queue that were obtained longer than 10 seconds ago.

remove_stale_results() and apply_rate() are called, in that order, immediately before packet transmission, and process_feedback() is called immediately after packet transmission.


SampleRate maintains data structures that keep track of the total transmission time , the number of successive failures , and the number of successful transmits for each bit-rate and destination as well as the total number of packets sent across each link. It also keeps a queue of transmission result (transmission time, status, destination and bit-rate) so it can adjust the average transmission time for each bit-rate and destination when transmission results become stale.


apply_rate() performs the following operations:

  1. If no packets have been successfully acknowledged, return the highest bit-rate that has not had 4 successive failures.

  2. Increment the number of packets sent over the link.

  3. If the number of packets sent over the link is a multiple of ten, select a random bit-rate from the bit-rates that have not failed four successive times and that have a minimum packet transmission time lower than the current bit-rate's average transmission time.

  4. Otherwise, send the packet at the bit-rate that has the lowest average 218.104.71.166transmission time.


When process_feedback() runs, it updates information that tracks the number of samples and recalculates the average transmission time for the bit-rate and destination. process_feedback() performs the following operations:

  1. Calculate the transmission time for the packet based on the bit-rate and number of retries using Equation 5.1 below.

  2. Look up the destination and add the transmission time to the total transmission times for the bit-rate.

  3. If the packet succeeded, increment the number of successful packets sent at that bit-rate.

  4. If the packet failed, increment the number of successive failure for the bit-rate. Otherwise reset it.

  5. Re-calculate the average transmission time for the bit-rate based on the sum of transmission time and the number of successful packets sent at that bit-rate.

  6. Set the current bit-rate for the destination to the one with the minimum average transmission time.

  7. Append the current time, packet status, transmission time, and bit-rate to the list of transmission results.


SampleRate's remove_stale_results() function performs these operations for each stale sample, it recalculates the minimum average transmission times for each bit-rate and destination. remove_stale_results() then sets the currents bit-rate for each destination to the one with the smallest average transmission time.


To calculate the transmission time of a n-byte unicast packet given the bit-rate b and number of retries r, SampleRate uses the following equation:


tx_time(b,r,n) = difs+backoff(r)+(r+1)(sifs+ack+header+(n*8/b))


where difs is 50 microseconds in 802.11b and 28 microseconds in 802.11a/g, sifs is 10 microseconds for 802.11b and 9 for 802.11a/g, and ack is 304 microseconds using 1 megabit acknowledgments for 802.11b and 200 microseconds for 6 megabit acknowledgment. Header is 192 microseconds for 1 megabit 802.11b packets, 96 for other 802.11b bit-rate, and 20 for 802.11a/g bit-rates.




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值