A Study of 802 . 11 Bitrate Selection in Linux

This paper investigates rate adaptation in 802.11 wireless networks, with a focus on algorithms currently available in the Linux operating system. The algorithms are compared with a simple rate adaptation algorithm from the literature, and modifications are presented that increase the performance of th e existing routines in the studied scenarios. In order to compare simulated results with physical results, and to leverage the Linux software ecosystem, a new software simulator based on a virtual 802.11 device is presented. I. I NTRODUCTION In 802.11 wireless networks, data may be transmitted with any of a number of rates, from low-speed bitrates that are resilient under poor channel conditions, to high-speed rat es that require a high signal level to function. The process of a utomatically selecting the rate that maximizes throughput, given the current channel conditions, is known as r te adaptation[1] and has been studied extensively. The first published rate adaptation algorithm, Auto-Rate Fallback (ARF), is an extremely simple state machine that predicts the rate based on the most recent successful rate. SampleRate [2] is a popular algorithm that builds a statisti cal model of rates based on frame success rate and computed throughput. These two algorithms form the basis for others examined later in the paper. Other algorithms attempt to predict the rate based on direct measurements of the signal level at either the transmitter o r receiver [3], [4]. Unfortunately, these solutions often re quire changes to the MAC layer, or expensive low-bitrate broadcas t packets. Recently, loss differentiation has emerged as a promising improvement to frame-loss based algorithms, particularly in congested networks. As these also usually require changes t o the 802.11 specifications [5], [6], or modifications to physi cal hardware [7], uptake of these algorithms in deployed system has been slow. Consequently, it is instructive to study the algorithms currently in wide use in 802.11 LANs. Simulation of rate algorithms has typically been performed using network simulators, such as ns2, originally develope d for wired networks. While these systems work well for comparing different algorithms under controlled circumstances, by t heir nature it is difficult to compare experimental results with real-world trials. Moreover, simulations from the literat ure often fail to account for cross-layer effects that would imp act practical implementations, such as routing delays, and TCP timeouts. One observation is that a simulator may account for crosslayer effects implicitly, by directly using the networking stack of the operating system. One prior attempt to bridge the gap between research simulators and deployed systems is given in [8]. The authors present the library libmac, which allows experimenters to capture and inject frames using modified 802.11 device drivers. This system utilizes physical radio s for packet collection and transport. For simulation purposes, it would be advantageous to instead use virtual radios and mode l the medium. Thus, this paper introduces a simulator based on a virtualized 802.11 device driver, using the Linux Mac80211 [9] wireless stack. In addition to capturing cross-layer effec ts, the proposed simulator provides the ability to directly compar e experiments utilizing virtual devices with those from phys ical devices. This simulator is then used in an investigation of r ate adaptation algorithms used in the Linux operating system. Section III describes the assumptions made about the network and typical hardware devices. In section IV, the rate lgorithms are briefly described. Section V formulates the channel models used in simulation. In section VI, a new 802.11 simulator that utilizes the Linux wireless stack is presented. In section VII, the rate algorithms are compared both in the simulator and in real world experiments. Finally , in section VIII, modifications to the Minstrel algorithm are proposed. II. D IFFERENCES FROMPREVIOUS WORK In this paper, three rate adaptation algorithms are examine d: Minstrel, PID, and AARF [10]. AARF has been presented and reviewed in the literature, as has SampleRate [11], the pred ecessor of Minstrel. Yet, the author is unaware of published comparisons of Minstrel and PID, the two rate adaptation algorithms presently available in the Linux kernel 2.6. 32. Simulations of rate adaptation algorithms have previously been carried out in network simulators with the same or similar channel models as those used in this work. The cross-layer accuracy of such simulations relies in some par t on the accuracy of models of other network layers. A new simulator is introduced that models only the 802.11 device and wireless medium while using the existing infrastructur e for the remaining layers. The virtual wireless device driver mac80211_hwsim existed prior to this project for testing Mac80211. In its more limited role as an API testing tool, the driver performed onl y TABLE I: 802.11a Rate Set Rate (Mbps) Modulation Coding Rate Bits per OFDM symbol 6 BPSK 1/2 48 9 BPSK 3/4 48 12 QPSK 1/2 96 18 QPSK 3/4 96 24 16-QAM 1/2 192 36 16-QAM 3/4 192 48 64-QAM 2/3 288 54 64-QAM 3/4 288 basic operations and did not attempt to simulate the wireles s medium. This kernel driver was rewritten to pass frames to user programs to ease development of the channel simulator. III. N ETWORK MODEL For this paper, the 802.11a PHY is used as the basis for experimentation. The newest standard, 802.11n, has recent ly been approved and provides 32 additional rates; however, th Linux rate adaptation API for 802.11n rates is still evolvin g at this time. The 802.11a rate set (Table I) is still in use as part of 802.11g, and provides a variety of speeds. In addition, this paper is primarily interested in applicat ons to small infrastructure networks. In ad-hoc and mesh system , both the range of the network and number of nodes is often large. As a result, rates that work over long distances may be preferred to high throughput, short range rates. Also, in large networks, hidden terminals are common, leading to the frequent use of low-bitrate RTS/CTS protection. A trend in consumer-oriented 802.11 hardware is the increasing use of so-called soft-MAC designs: devices consis ti g primarily of radios and small embedded CPUs where most of the 802.11 MAC Layer Management Entity (MLME) features are performed off-chip by the host computer. These designs a re low cost and have the advantage of being software-updateabl e. Such designs often omit explicit rate control features, rel ying on the host to provide a rate or a set of candidate rates for a frame. A typical design is the Atheros 5212, in which each frame is accompanied by a multi-rate retry (MRR) descriptor . The descriptor consists of four candidate rates, r1, r2, r3, r4, along with a set of retry counts, c1, c2, c3, c4. The device will attempt to transmit a frame c1 times at rater1, thenc2 times at r2, etc., until the retry counts are exhausted or until an ACK is received. The simulator assumes a similar design. IV. RATE ALGORITHMS ARF [12] is among the earliest developed automatic rate selection algorithms. In ARF, if packets are transmitted su ccessfully a fixed number of times, then the rate is raised. If there is a frame loss immediately after a rate change, or if there are two consecutive failures, the rate is lowered. Ada ptive Auto-Rate Fallback (AARF) [10] utilizes the basic results of ARF, but adds the notion of an exponentially increasing threshold for raising the rate. This is intended to correct the observed problem that the periodic failed transmission attempts at higher rates led to decreased overall throughpu t. Minstrel, based on [2], takes a probabilistic approach. Ten percent of sent frames include a random probe rate as the first rate in the MRR chain. Success at each rate is recorded as packets are sent. Every 100 ms, the probabilities of success and computed throughput are updated for all packets, and the se are combined with previous results using an exponentially weighted moving average. The MRR descriptor includes the two best throughputs followed by the best probability rate, then followed by the lowest available rate. The MRR retry counts are selected such that transmissions at a given rate f or all attempts should take no more than 6 ms, and the entire transmission takes less than 24 ms. PID is based on the concept of the proportional-integralderivative feedback controller [13]. The algorithm adjust s the transmission rate to achieve a maximum of 14% transmission failures. Every 125 ms, the controller recomputes the avera ge number of failed transmissions with an exponentially weigh ted moving average. If a large amount of frame loss is detected, the controller can enter a sharpening mode, in which large adjustments to the rate can be made to more quickly approach the targeted success percentage.