Sunteți pe pagina 1din 22

A Capacity Analysis for the IEEE 802.

11 MAC Protocol
Y.C. Tay K.C. Chua National University of Singapore Abstract The recently proposed IEEE 802.11 MAC protocol provides shared access to a wireless channel. This paper uses an analytic model to study the channel capacity | i.e. maximum throughput | when using the basic access (two-way handshaking) method in this protocol. It provides closed-form approximations for (1) the probability of collision p, (2) the maximum throughput S and (3) the limit on the number of stations in a wireless cell. The analysis also shows that (4) p does not depend on the packet length, the latency in crossing the MAC and physical layers, the acknowledgement timeout, the interframe spaces and the slot size; (5) p and S (and other performance measures) depend on the minimum window size W and the number of stations n only through a variable g = W=(n + 1) | consequently, halving W is like doubling n; (6) the maximum contention window size has minimal e ect on p and S ; (7) the choice of W that maximizes S is proportional to the square root of the packet length; (8) S is maximum when transmission rate (including collisions) equals the reciprocal of transmission time, and this happens when channel wastage due to collisions balances idle bandwidth caused by backo s.

Keywords: IEEE 802.11 MAC protocol, capacity analysis, saturation throughput, closed-form 1 Introduction
approximation, backo thrashing, analytic validation. With the proliferation of mobile computers, their limited computing resources, and the popularity of Internet access, there is a growing need for these computers to be networked. In response, the IEEE 802.11 study group has recently proposed a standard for wireless local area networks IEEE]. This standard speci es the characteristics of the physical layer, as well as the medium access control (MAC) protocols in the link layer. There are essentially two MAC protocols in the proposal | a basic access method that uses two-way handshaking (DATA-ACK) and a RTS/CTS variant that uses request-to-send and clear-to-send messages in a four-way handshake (RTS-CTS-DATA-ACK). This paper analyzes the former but not the latter, for two reasons: (1) the basic access method is mandatory, whereas RTS/CTS is an optional variant; (2) the performance for RTS/CTS is signi cantly di erent from that for basic access BFO], and therefore requires a separate analytic model. 1

We also do not discuss the no-ACK option meant for broadcasts and multicasts, nor the point coordination function, which is an optional polling scheme de ned on top of basic access. The basic access method uses carrier-sensing multiple access with collision avoidance (CSMA/CA). There are numerous CSMA protocols, and their performance under low load conditions are usually similar To, V]. The many variations arise because of e orts to improve on performance and push back the limits. Our analysis therefore focuses on the most important such limit | namely, the maximum (or saturation) throughput, which measures the capacity when the protocol is used to access the channel, and is lower than the raw bandwidth for the physical medium itself. Our model assumes that the stations are homogeneous in tra c generation, channel noise is negligible, and there are no hidden terminals. A scenario that may t these assumptions would be a classroom or meeting in which students or executives exchange information on their laptops. From the modeling perspective, it is not di cult (but somewhat tedious) to take noise into consideration; also, hidden terminals require a separate model and, in any case, should be analyzed together with RTS/CTS because the two are closely related BFO, CG, HC]. In contrast to previous simulation studies of the 802.11 MAC protocols BFO, NI, VE], the performance analysis we present here is based on a mathematical model. This model not only di ers from previous analytic models of the 802.11 protocols CG, HC], it is also di erent from the other techniques in the CSMA literature AS, HLR, KT, PSP, S, TT, TK]. Our technique is simple, yet e ective: It provides closed-form expressions for the probability of a collision and the saturation throughput, thus facilitating the analysis of various issues, like the choice of window size, the limit on the number of stations, and the tradeo between collisions and backo s. It also yields two rules of thumb: halving the initial window size W (for the exponential backo ) is similar in e ect to doubling the number of stations, and the optimum choice of W is proportional to the square root of packet size. A performance model is usually validated by comparing its numerical predictions with simulation results. For our model, we also check its analytical conclusions against simulated performance | we call this analytic validation. We use Bianchi et al's simulator BFO] for the validation; this simulator is comprehensive in capturing the many details in the 802.11 protocol. Although our model omits many of these details and relies on many approximations, the comparison shows that it is accurate both numerically and analytically. We begin in Section 2 by describing the protocol, and introduce the performance model in Section 3. We then check the numerical accuracy of the model in Section 4, before using it to analyze the protocol in Section 5; there, we constantly use the simulator to check the results from the analysis. Section 6 summarizes our conclusions. The Appendix contains a detailed derivation of our performance model.

2 Protocol Description
The basic access method for the 802.11 MAC protocol works as follows: To send a packet, a station X rst listens to the channel for time TDIFS (DIFS is distributed interframe space). If there is silence for TDIFS , X proceeds with the transmission (e.g. Station A in Figure 1); otherwise, 2

DIFS Station A

DIFS

DIFS

DIFS

DIFS

DIFS

defer Station B

defer Station C

defer Station D

defer Station E

transmission

backoff

remaining backoff

Figure 1 Basic access in the MAC protocol (with SIFS and ACK omitted).
interval (e.g. Station C in Figure 1). ~ ~ X chooses the backo with an integer uniformly distributed over 0; 1; : : : ; W ? 1, where W is ~ the contention window size. For each packet, X initializes W to be W , the minimum window size. ~ X sets a timer to W and decrements it after every Tslot period of silence, but suspends it if another station Y begins transmission; when the timer reaches 0, X begins transmission of its packet (e.g. Stations B , D and E in Figure 1). The packet is transmitted in its entirety, even if there is a collision, since X does not do collision detection. The receiver uses the CRC (cyclic redundancy check) bits in each packet to check for collisions and, if no error is detected, sends an ACK (acknowledgement) after time TSIFS (SIFS is short interframe space; TSIFS < TDIFS ). If the sender does not detect an ACK within ~ an ACK-timeout, it enters a retransmit backo : if W is smaller than the maximum window size ~ ~ 2m W , then W is doubled (thus, m is the number of retransmission attempts before W reaches its maximum size | thereafter, the window size remains unchanged until it is reinitialized to W ~ for a new packet); X sets a timer to a value uniformly chosen from less than the new W , and (re)transmission is postponed to when this timer expires, as before. Finally, a station must separate two consecutive transmissions by a random backo , even if the channel is idle for DIFS after the rst transmission (e.g. Station B in Figure 1.) 3

X waits for the rst TDIFS of silence after the current busy period, then backs o for a random

3 The Performance Model


The signal propagation delay in a local area network is very small, so a carrier sensing protocol may be expected to have a negligible probability of collision. However, because time is slotted (with the help of synchronizing beacons) and transmissions occur at the beginning of slots, a window size of, say, 32 slots means that there are only 32 possible choices of transmission times within a range of 32Tslot , where Tslot is the time duration of a slot. If, say, 10 stations are choosing transmission times from the same 32 slots (after the DIFS that follow a busy period), then the probability of a collision p is very high. The basic access method in the 802.11 MAC protocol is designed to avoid collisions (e.g. the random backo interval if the channel is found to be busy). While it is possible to stress the protocol with a workload that causes a high collision rate, the protocol is clearly not designed for such workloads. Speci cally, workloads that cause p to exceed, say, 0.5 should probably be considered incompatible with the protocol, and require more access coordination, such as that provided by RTS/CTS. Our performance model for basic access is therefore restricted to workloads for which p is small (less than 0.5). Note that this is not the same as saying workload is low, since our analysis is focused on saturation throughput, which is clearly heavy (in fact, maximum) workload; in other words, saturation happens for small p as well. Indeed, simulation results show that our model is accurate even when the saturation throughput is thrashing, i.e. decreasing as more stations are added. It is a common misconception that throughput thrashes (only) because of too many collisions when, in fact, thrashing can also happen because senders spend too much time waiting for each other in backo s | we call this backo thrashing, and it is something to guard against in a CSMA/CA protocol. (A similar phenomenon occurs in transaction processing TGS].) The details for our model are given in the Appendix. There, we show that p is the root of the approximation m 2? 2 p 1 ? p ? p(2p) = W 1 + 3 n n ? 1 ; (1) 1 ? 2p n

where W (slots) is the minimum window size, 2m W is the maximum window size and n is the number of stations. The rates of successful (i.e. uncollided) transmissions, transmissions (k packets that collide count as k transmissions) and collisions (multiple packets that collide count as one collision) are given by 1 ? ; (2) rsuccess = 2(1? pp) 2 Tphysical + TSIFS + TACK + TDIFS + nW Tslot +1 2 1 (3) rxmit = 2 ? p Tphysical + TSIFS + TACK + TDIFS + nW Tslot +1 p 1 (4) and rcollision = 2 ? p Tphysical + TSIFS + TACK + TDIFS + nW Tslot +1 respectively, where Tphysical is the transmission time for a physical packet (payload plus headers), TSIFS is the time duration for a SIFS, TACK is the transmission time for an ACK, TDIFS is the time 4

duration for a DIFS, and Tslot is the slot time. The two most important performance measures are the total channel utilization

utotal = rsuccess (Tphysical + TACK ) + rcollisionTphysical

(5)

and the saturation throughput (the fraction of channel bandwidth that is used to successfully transmit payload bits) ? Tpayload ; (6) S = 2(1? pp) 2 Tphysical + TSIFS + TACK + TDIFS + nW Tslot +1 where Tpayload is the transmission time for payload bits.

4 Numerical Validation
For validation, we use Bianchi et al's discrete-event simulator (written in C++). The number of stations n is assumed to be xed, all packets are of the same size and not fragmented, the time between packet generation is exponentially distributed, and there is no noise and no hidden terminal. The packet format and parameter values used in the simulation are shown in Table 1. The latter values are those for the frequency hopping physical layer. In Table 1, RxTx Turnaround Time is the time between when the MAC transmission request is sent to the physical layer and when the rst bit is transmitted; the Busy Detect Time is the time between when the channel changes state and when the MAC layer receives noti cation. Channel Bit Rate Propagation Delay RxTx Turnaround Time Busy Detect time SIFS DIFS ACK Timeout Slot Time 1 Mbits/sec 1 sec 20 sec 29 sec 28 sec 130 sec 300 sec 51 sec

packet payload MAC header PHY header ACK length

8184 bits 272 bits 128 bits 240 bits

Table 1 Packet format and parameter values used in the simulation.


In the gures that follow, each sample point represents the average from 10 simulation runs; each run is for 10 secs of simulated time, with the rst 5 secs of transient behavior ignored. The 95% con dence interval for each sample point is usually too small to be shown in the gures. To verify the numerical accuracy of our model, we compare its prediction of the two most important performance measures p (see Figure 2) and S (see Figures 3 and 4) to results from the simulator. The curves in each graph are plotted by solving (1) and (6); for W = 16 and W = 32, they are truncated at p = 0:5, since higher values of p are of no practical interest. (For p > 0:5, every packet would have to be sent more than twice, on average; users are unlikely to tolerate such wastage of bandwidth.) 5

p 0.5 0.4 0.3


A A B C D B C D D E D D E E E D E B C C

0.2 0.1
A C

B C

A B C D E
n

16 32 32 128 256

m
3 3 5 3 3

Figure 2 Comparison of model's prediction (solid line) against simulation results for p.

10

20

30

40

50

S
A D C B E A D E C B A E C B C B C E D

0.8
D

E D

E D

E D

0.7

0.6

0.5

0.4

0.3

0.2

0.1 n 0

A B C D E
10 20 30 40 50

16 32 32 128 256

m
3 3 5 3 3

Figure 3 Comparison of model's prediction (solid line) against simulation results for S .
6

S
0.8 F F G 0.7 G 0.6 H 0.5 F H F G H F G H F G H H G

0.4

0.3

0.2

0.1

F G H
W
32 64 128 256 512 1024

5 20 50

m
3 3 3

0.0

Figure 4 Comparison of model's prediction (solid line) against simulation results for S .

The gures show that the model is reasonably accurate, despite its many approximations. Moreover, the accuracy holds good even when S drops as we increase n (Figure 3) or W (Figure 4). In particular, for W = 128 and W = 256 (D and E curves) S is maximum when p is small, thus indicating backo thrashing. Again, it would be meaningless to take the model validation far into the thrashing region (where throughput is dropping), since the protocol is clearly not designed to operate in that region. We will present more data from the simulator, and study the interesting shapes in Figures 3 and 4, in the next section.

5 Protocol Analysis
We now use our model to analyze the protocol. As with any approximate performance model of a system, one must be careful that the properties deduced from the model are in fact properties of the system, and not just properties of the approximation itself. In the following, we always make an attempt at analytic validation, i.e. verify that the results from our analysis apply to the simulated behavior of the protocol. The probability of a collision does not depend on packet length, the latency in crossing the MAC/PHY layers (i.e. RxTx Turnaround Time and Busy Detect Time), the acknowledgement timeout, the interframe spaces and the slot size; it only depends on W , m and n. 7

Claim 1

Proof

This follows from (1). To validate this claim, we ran the simulator for various choices of Tpayload , RxTx Turnaround Time, Busy Detect Time, TSIFS , TDIFS and Tslot . Table 2 shows that only W , m and n a ect p. (In fact, the e ect of m is minimal | see Claim 3.) RxTx 10 20 20 40 40 10 20 20 40 40 20 BusyDT Tslot 15 27 29 51 29 51 50 92 50 92 15 27 29 51 29 51 50 92 50 92 29 51

TSIFS TDIFS ACK T


18 28 28 48 48 18 28 28 48 48 28 120 130 130 150 150 120 130 130 150 150 130 270 280 280 300 300 270 280 280 300 300 280

Tpayload
512 512 8184 512 8184 8184 8184 512 8184 512 8184

n
10 10 10 10 10 5 5 5 5 5 5

W
256 256 256 256 256 32 32 32 32 32 32

m
3 3 3 3 3 3 3 3 3 9 9

p
0.062 0.065 0.061 0.065 0.067 0.175 0.179 0.181 0.178 0.180 0.186

RxTx is RxTx Turnaround Time, BusyDT is Busy Detect Time, ACK T is ACK-timeout.

Table 2 Validating Claim 1: p only depends on W , m and n.


Even the dependence on W and n can be simpli ed:

Claim 2 Proof

The protocol's performance (p, rsuccess , rxmit, rcollision, S , utotal ) depends on the minimum window size W and number of stations n only through g = nW when n is large (say, n 5). +1 The RHS of (1) can be approximated by
2 n + + 2 1 + 3 n n ? 1 = 2n +n ? 3 2n 3 1 2(n 3 1) : n 3 (The approximations here may seem arbitrary, but they are in fact guided by simulation results.) Hence, p becomes the root of the approximation
?

+ p 1 ? p ? p(2p) = 4 nW 1 : 1 ? 2p 3

(7)

The claim now follows from (2){(7). To validate this claim, the simulator's values for p and S in Figures 2 and 3 are plotted against g in Figures 5 and 6 for n 5. We see that the data points do in fact form a single curve, despite large variations in W (16 to 256) and n (2 to 50). 8

p
0.5
B D C

0.4

B A C D

0.3

D C B A D E E C D B E D

0.2

0.1

E D D D E E D E D

A B C D E
g
20 24 28 32 36 40

16 32 32 128 256

m
3 3 5 3 3

Figure 5 Validation of Claim 2 that p is a function of W and n only through g.


(Values for W , m and n are as in Figure 2.)

12

16

0.8
A BC AE DD C A B C D B C

B C D E D

D E

DE

E D E D

0.7

0.6

0.5

0.4

0.3

0.2

0.1

A B C D E
g
4 8 12 16 20 24 28 32 36 40

16 32 32 128 256

m
3 3 5 3 3

Figure 6 Validation of Claim 2 that S is a function of W and n only through g.


(Values for W , m and n are as in Figure 3.) 9

Claim 2 now makes the complicated, unintuitive behavior in Figure 3 easy to understand: all the curves are manifestations of the same curve in Figure 6. For W = 16 and W = 32, the curves are taken from the pre-maximum segment in Figure 6 (because W is small), so there are no maximums; the curves for W = 128 and W = 256 are two segments of the same curve that are scaled, re ected, translated and superimposed in Figure 3. The choice of m splits the curve for W = 32 in Figure 3 when n is comparable to W because the relevant segment (near g = 0) in Figure 6 is steep in this range and sensitive to the window size. It is intuitively obvious that increasing the number of stations n will have a signi cant impact on the throughput. One may think that the minimum window size has a secondary e ect, since a choice of W that is too small can always be remedied with exponential backo . However, the following corollary of Claim 2 shows that W and n have equivalent e ect: Halving the initial window size has similar impact on saturation throughput as doubling the number of stations. This follows from (6) and (7) and the fact that W=2 W n + 1 2n : Let S be the saturation throughput for some choice of W , m and n, SW=2 the new S when W is halved, and S2n the new S when n is doubled. Figure 7 compares SW=2 and S2n from the simulator for a wide range of values in W and n. (The next claim considers the e ect of m.) The data points lie close to the line SW=2 = S2n , thus supporting the corollary. This is another example of what we mean by analytical validation of the model: Analysis of our model leads to the claim that SW=2 = S2n , and this claim is then checked with simulated values of SW=2 and S2n . This is unlike the numerical validation in the previous section, where the comparison is between the model's prediction and the simulation's result. Bianchi et al have observed that throughput performance is strongly dependent on W ; using our model, we have now quanti ed (with Corollary 1) this dependence through the e ect of n. Corollary 1 points out the importance of the minimum window size. We now show that, in contrast, the maximum window size has only a small e ect on p and S .

Corollary 1

Proof

Claim 3 Proof

Suppose p < 0:5. For small p, the choice of maximum window size has minimal e ect (namely, O(p(2p)m )) on the collision rate and saturation throughput.
m 2? 2 ? pm 1 ? pm ? pm(2pm ) = W 1 + 3 n n ? 1 = p1 11? 2pp1 : 1 ? 2pm n 1

Suppose

(8)

10

S W/2
1.0

0.9
H

0.8
B A D E

F I C G

0.7

0.6

A B C D E F G H I
0.9 1.0

5 5 5 10 15 10 15 10 50

16 16 32 32 32 128 128 256 256

m
3 5 5 3 3 3 3 3 3

0.5

Figure 7 Validation of Corollary 1 that halving W has the same e ect on S as doubling n.

0.6

0.7

0.8

S 2n

Since 2p < 1, we get

i.e. pm is the root of (1) for maximum window size 2m W and p1 is the root for unbounded window size (using 2p < 1). Let p = (p1 ? pm )=pm . Ignoring the higher order terms k for k 2, (8) p gives 1 ? 2pm p = ?pm (2pm )m 1 ? 2p + 2p2 (1 ? (2p )m ) :
m m m

j p j < pm(2pm)m :

(9)

Similarly, if Sm and S1 are the corresponding throughputs and S = (S1 ? Sm)=Sm , then we get from (6)
S=

2(1 ? pm(1 + p )) 2 ? pm ? 1 = ? pm p 2 ? p(1 + p ) 2(1 ? pm ) (2 ? pm (1 + p ))(1 ? pm ) :

Since p < 0, we have

p j j j S j < (2 ? p m)(1p? p ) : m m

(10)

For example, if m = 3 and pm = 0:3, then the RHS of (9) is less than 0.065 and the RHS of (10) is less than 0.017, showing that the choice of m (between 3 and 1) has minimal impact on p and S . To validate this claim with the simulator, Table 3 examines the e ect of choosing between m W and 2i W as the maximum window size for some values of W and n. The simulations show 2 that the e ect is even smaller than the tight bounds derived with our model. Using Claim 3, we can now express p and S explicitly in terms of the parameters in Table 1: 11

W
16 32 32 32 128 128 256

n
5 5 5 2 10 30 30

g
2.7 5.3 5.3 10.7 11.6 4.1 8.3

m
3 3 5 3 3 3 3

i
10 9 9 9 7 7 6

0.268 0.179 0.183 0.053 0.108 0.257 0.170

pm

0.268 0.186 0.186 0.053 0.110 0.254 0.165

pi

pi ?pm pm

0.0% 3.9% 1.6% 0.0% 1.9% 1.2% 2.9%

0.769 0.809 0.806 0.848 0.829 0.773 0.808

Sm

0.769 0.805 0.805 0.848 0.828 0.774 0.810

Si

Si ?Sm Sm

0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0%

Table 3 The e ect of maximum window size on p and S . Claim 4


The saturation throughput can be approximated by

? where p = 1 1 + 38g ? 1 + 38g 2 2 and g = nW 1 : +

? S = 2(1? pp) 2

Tpayload Tphysical + TSIFS + TACK + TDIFS + nW Tslot +1


r

(11) (12)

Proof

Since the choice of m has minimal impact on p, we can approximate (7) by

p(1 ? p) = 4 : 1 ? 2p 3g
This has solution
? p = 1 1 + 38g ? 1 + 38g 2 : 2 (The positive square root gives p > 1, which is impossible.) The claim follows from (6). Equations (11) and (12) are plotted in Figures 8 and 9, which show that the explicit expressions are reasonably accurate in estimating p and S . Figure 6 shows that there is a value of g for which S is maximum. The next claim locates this maximum. r

Claim 5

Suppose Tpayload >> nW > 3. The saturation throughput is maximum when Tslot +1

W = 2 Tphysical + TSIFS + TACK + TDIFS (n + 1): 3 T


slot

12

p
0.5
B D C

0.4

B A C D

0.3

D C B A D E E C D B E D

0.2

0.1

E D D D E E D E D

A B C D E
g
24 28 32 36 40

16 32 32 128 256

m
3 3 5 3 3

Figure 8 Validation of closed-form expression (12) for p. (Data points are as in Figure 2.)

12

16

20

0.8
A BC AE DD C A B C D B C

B C D E D

D E

DE

E D E D

0.7

0.6

0.5

0.4

0.3

0.2

0.1

A B C D E
g
4 8 12 16 20 24 28 32 36 40

16 32 32 128 256

m
3 3 5 3 3

Figure 9 Validation of closed-form expression (11) for S . (Data points are as in Figure 3.)
13

Proof

To determine the maximum, rst let

a = Tpayload T
slot

and

b = Tphysical + TSIFS + TACK + TDIFS : T


slot

Then, from (11) and (12),

dS = ?2 a 1 dp + 1 ? p dg 2 ? p b + g 2 ? p dg b + g 1? dp where dg = ? 2 382 1 ? q 8 8 : g 3g 1 + ( 3g )2
The maximum requires dS = 0, i.e. dg

(13)

dp = ? (2 ? p)(1 ? p) ? 2 ? 3p since b > Tphysical >> W = g: dg b+g b Tslot n+1


Using (13), we now have 1? 8 1 ? q 8 = 2 ? 3p : 2 2 3g b 3g 1 + ( 38g )2 4 ?1 ? 8 3g2 3g This gives a solution 1 ?2 ? 3 8 : b 2 3g
r

Given g > 3, we can use (12) to simplify the approximation as

and the claim follows. For the parameter values in the simulation, Claim 5 puts the maximum at g = W=(n + 1) 11. Thus, a class of 15 students should set W to be 176 (assuming the parameter values and tra c assumptions apply). Since the curve for S is very at around the maximum, the value 11 here is just a \ballpark" gure | it wouldn't matter much to S if the ratio deviates somewhat from 11. Because the maximum is at, randomness in the sample average S makes locating the maximum | and hence validating Claim 5 | di cult. However, the claim is consistent with an analysis by Bianchi et al, who show that, for constant backo (i.e. no exponential enlargement of the backo window size), S is maximum at

2b ; 3

n 2 Tphysical + TSIFS + TACK + TDIFS : T


slot

It follows that, for the same n(> 1), saturation throughput under constant backo is maximum at a larger (initial) window size than under exponential backo ; this formally con rms one's expectation 14

that, with exponential backo to help adjust the approximate window size, the protocol can a ord to be aggressive and start with a smaller W . Claim 5 leads to the following instructive rules: For maximum throughput, (i) W should increase linearly with n and (ii) W should be proportional to the square root of the packet size (in slots), assuming Tphysical >> TSIFS + TACK + TDIFS . This corollary suggests how the protocol can be made adaptive: By monitoring the tra c, the nodes in a cell can estimate n BFO] and the packet size, and scale W up or down when they increase or decrease. Although packet sizes do not a ect p (Claim 1), they do a ect S , thus leading to Corollary 2(ii). There are, in fact, two underlying forces that determine S as we vary W . Intuitively, if W is too small, throughput is adversely a ected by collisions; as W increases, the collision rate decreases, but then more channel bandwidth is lost to backo s. Thus, the maximum is a tradeo between bandwidth wastage by collisions and by backo s. The next claim con rms this intuition:

Corollary 2

Claim 6

Suppose TACK << Tphysical . Bandwidth wasted by collisions exceeds idle bandwidth caused by backo s if and only if r > 1 :
xmit

Tphysical

Let ucollision be the fraction of bandwidth wasted by collisions. We can estimate the channel silence due to backo s by 1 ? utotal . The di erence between the two is = ucollision ? (1 ? utotal ) = rcollisionTphysical ? 1 + (rsuccess (Tphysical + TACK) + rcollision Tphysical ) by (5) (2rcollision + rsuccess )Tphysical ? 1 since TACK << Tphysical = r ? 1 where r = rxmit Tphysical ; using (2) ? (4): Hence, > 0 if and only if r > 1, and the claim follows. The claim is intuitively appealing because 1=Tphysical is the maximum transmission rate if packets do not overlap, so the result says that to exceed this rate is to waste bandwidth on collisions, while a lower rate causes excess idle bandwidth. (Note that utotal need not be 1 when rxmit = 1=Tphysical , because some transmissions may collide and overlap; in other words, there may be signi cant idle bandwidth even if rxmit = 1=Tphysical .) 15

Proof

n = 5; m = 3 W S rxmitTphysical n = 20; m = 3 W S rxmitTphysical n = 50; m = 3 W S rxmitTphysical

32 0.81 1:04 32 0.68 1.24 32 0.56 1.48

64 0:83 0:98 64 0.73 1.15 64 0.65 1.30

128 0.83 0.91 128 0.80 1:04 128 0.73 1.16

256 0.78 0.84 256 0:82 0:99 256 0.79 1.06

512 0.70 0.74 512 0.82 0.91 512 0.81 1:01

1024 0.57 0.60 1024 0.77 0.84 1024 0:83 0:94

Table 4 Validation of Claim 6 that rxmitTphysical = 1 when W is optimum.


As validation, Table 4 shows the simulator's value of rxmit Tphysical decreasing from one side of 1 to the other as W increases, with the crossover happening near where W is optimum (i.e. S is maximum). Having examined the choice of W for a xed n, we now consider: For a given W and tra c rate of packets/sec from each station, what is the congestion point, i.e. the value of n at which saturation sets in?

Claim 7

Proof

Suppose Tphysical >> TSIFS + TACK + TDIFS + W Tslot . For a given minimum window size W and 3 throughput per station, congestion (meaning S is near its maximum) occurs when 1 n=n = (14) 2 : Tphysical + 3W

For all tra c to get through, we require

n Tpayload < S = rsuccess Tpayload :


Thus, from (2), the maximum n is given by

n
From (12), we get

1? p 2

Tphysical + TSIFS + TACK + TDIFS + nW Tslot +1

1 + n (Tphysical + TSIFS + TACK + TDIFS + nW 1 Tslot ) 1 ? 4 8(nW 1) : + 3 W Tslot TSIFS + TACK + TDIFS + W Tslot , since congestion Now Tphysical >> TSIFS + TACK + TDIFS + 3 n+1 is meaningful only if n 2. Hence n n Tphysical 1 ? 32W ; 16

W
3.0 3.0 3.0 6.0 6.0 6.0 6.0 9.0 9.0 12.0 12.0 12.0 32 32 64 32 64 64 1024 32 128 8 16 32

from (14) 21 21 28 14 16 16 19 10 12 5 7 8

m
3 6 6 3 3 6 3 3 3 3 3 3

from simulator 0.53 0.53 0.70 0.70 0.75 0.75 0.77 0.75 0.82 0.50 0.70 0.78

from simulator 0.59 0.65 0.70 0.69 0.75 0.76 0.78 0.72 0.82 0.65 0.70 0.78

(i)

(ii) (iii)

Table 5 Comparing the throughput at the congestion point n and at saturation.


and the claim follows. Table 5 compares the throughput S at n computed from Claim 7 (rounded to the nearest integer) against the saturation throughput S when n is unbounded and each station generates tra c at packets/sec. The table shows that throughput at the congestion point n is in fact close to saturation, except when the saturation throughput is sensitive to the choice of m (see (i); recall the related remark after Claim 2), and when n is so small that there is a signi cant di erence in throughput between n = n and n = n + 1 (see (iii)); note that, within experimental error, S may exceed S (e.g. (ii)). Like for Corollary 2, (14) suggests a way of making W adaptive: By monitoring n and the average packet rate, the nodes in a cell can compare n to n and adjust W accordingly. If n << n , W can be reduced, thus reducing backo s and improving send latency; if n approaches n , the congestion can be relieved by increasing W . Note that there is a limit to how far the congestion point n can be pushed by increasing W , since limW !1 n = 1= Tphysical .

6 Conclusion
We draw two sets of conclusions from our analysis, one on the analytic technique, and one on the protocol's behavior. The technique of using average values wherever possible is simple (see Appendix), yet accurate (see Figures 2, 3, 4, 8 and 9); the accuracy remains good even when the saturation throughput is thrashing. It provides closed-form expressions (see Claims 4, 5 and 7) and reveals several properties of the protocol. These properties, rst proved with the technique, are con rmed by the simulator. They include: how hardware features (e.g. RxTx Turnaround Time and Busy Detect Time), protocol parameters (e.g. ACK-timeout and interference spaces) and tra c characteristics (e.g. payload) 17

a ect | or do not a ect | performance (Tables 2 and 3); how window size W and the number of stations n a ect performance through the single parameter g = W=(n + 1) (Figures 5 and 6); and how the optimum W is determined by the tradeo between collisions and backo s (Claim 6 and Table 4). The model also provides instructive guidelines on the e ect of W (Corollary 1 and Figure 7), the choice of W (Corollary 2) and the limit on n (Claim 7 and Table 5).

Acknowledgement
We thank Giuseppe Bianchi for giving us a copy of their simulator, Matteo Oliveri for explaining the simulator, Mooi Choo Chuah for explaining the MAC protocol, and Brahim Bensaou for helpful comments on the draft.

Appendix: The Performance Model


n W m Wbacko Tslot TSIFS TDIFS Tpayload Tphysical TACK Tslice Tcycle rsuccess rcollision rxmit p S utotal
the number of stations in a wireless cell minimum window size maximum window size is 2m W (average) backo window size slot time time duration of short interframe space time duration of distributed interframe space time to transmit payload bits time to transmit packet (including headers) transmission time for an acknowledgement slient time between contentions, observed by a station time between the start of two payload transmissions rate of successful (i.e. uncollided) transmissions rate of collisions rate of transmissions probability of a collision channel utilization by successful transmission of payload bits total channel utilization (including collisions)

Table A1

Glossary

The performance analysis of any real system requires approximations if it is to be tractable. Only idealized queues (e.g. M/M/1) and networks (e.g. product-form) can be analyzed exactly K]. For example, stochastic analysis of a protocol must adopt assumptions (e.g. exponential distributions, independent variables) and techniques (e.g. state space aggregation) that are { in e ect { approximations of reality. Our model makes numerous approximations, some implicitly, but these approximations are 18

Wbackoff Tslot

time Tslice transmission Tslice contention transmission Tslice contention transmission timer ends transmission begins

Figure A1

Contentions divide backo into time slices.

carefully chosen by using the simulator to check their e ect on the model's accuracy. The tradeo is between simplicity (to facilitate analysis) and accuracy, since the conclusions drawn from the approximate model are acceptable only if it is numerically accurate. Instead of using the detailed stochastic models that are popular in CSMA analysis KT, PSP, RS, Ta, TT]. we use the average value for a variable wherever possible | this is a methodology that is commonly used in the performance analysis of computer systems. The model hinges on estimating p, the probability of a collision (Table A1 lists the variables used in our analysis). At saturation, a transmitting station will always have a queue of packets to send, so every transmission is preceded by a backo (see the nal remark in Section 2's protocol description). Since the backo is uniformly distributed over 0; 1; : : : ; W ? 1, the backo timer is W=2 (slots) | on average | at rst; for simplicity, we use W=2 instead of (W ? 1)=2. Each collision causes a dilation of the contention window until the maximum is reached, so the (average) backo window size is m m Wbacko = (1 ? p) W + p(1 ? p) 2W + + pm(1 ? p) 2 2W + pm+1 2 2W 2 2 1 ? p ? p(2p)m W (A1) = 1 ? 2p 2 The backo timer is decremented after each time slot unless a contention | i.e. a transmission by another station | causes the timer to be suspended. The contentions thus divide the backo into ncontention + 1 time slices of Tslice each (see Figure A1), so (ncontention + 1)Tslice = Wbacko Tslot : (A2) We now estimate the probability of a contention caused by station C transmitting during station B 's backo . At saturation, each station alternates between transmission and backo . Therefore, when B 's timer begins, C is in a backo (see Figure A2), and the average residual life of C 's timer is Wbacko =3. (The expected residual life is m2 =2m1 , where mi is the i-th moment of the timer distribution K]; for a uniform distribution, m2 = Wbacko 2 =3 and m1 = Wbacko =2.) Now there is contention from C if and only if B 's timer expires after C 's. This has probability 1 ? Wbacko =3 = 2 : Wbacko 3 19

timer begins C B timer begins residual life

timer ends

timer ends (no contention from C)

timer ends (contention from C)

Figure A2

Contention from C during B 's backo .

2 A station's backo timer can therefore expect about 3 (n ? 1) interruptions from the other n ? 1 stations. This is an underestimate, since B 's timer can be interrupted more than once by C ; a check with the simulator shows that a better estimate is given by 2 ncontention = 3 n: (A3) Substitution into (A2) gives (A4) (1 + 2 n)Tslice = Wbacko Tslot : 3 Since p < 0:5, most transmissions are rst attempts preceded by carrier sensing. Therefore, most collisions occur because one station senses an idle channel in the slot just before a transmission, so p can be approximated by Tslot =Tslice . However, this is an overestimate because we have not excluded transmissions that belong to the station itself. To factor out these transmissions, we use

T p = n ? 1 T slot ; n
slice

(A5)

this is similar to the Schweitzer approximation J] for queueing networks, and correctly gives p = 0 for n = 1. Eliminating Tslice and Wbacko from (A1), (A4) and (A5) gives
m 2? 2 p 1 ? p ? p(2p) = W 1 + 3 n n ? 1 : 1 ? 2p n For given W , m and n, this equation can be solved for p.

(A6)

The next task is to derive the saturation throughput and other performance measures. Since each transmission has probability p of collision, and a station transmits a packet multiple times until it receives an acknowledgement (thus indicating a successful transmission), we can model the number of transmissions per packet as geometrically distributed with probability of success 1 ? p and average 1=(1 ? p). But the average number of transmissions per packet is also rxmit=rsuccess , so 1 rxmit 1 ? p = rsuccess : (A7)

We count multiple transmissions that collide as one collision; to a rst approximation, each collision is between just two transmissions, so

rxmit ? rsuccess = 2rcollision:


20

(A8)

The transmission episodes along the time-line occur at rate 1=Tcycle | where Tcycle is the time between two payload transmissions | and consist of successful and collided transmissions, so 1 =r +r : (A9)

Tcycle

success

collision

(A7), (A8) and (A9) give

The time Tcycle consists of the physical transmission time, a SIFS, an acknowledgement, a DIFS (the last three are also used to approximate the ACK-timeout for collided transmissions) and a silent interval. In (A4), this slice of silence is

2 rxmit = 2 ? p T 1 cycle p 1 : and rcollision = 2 ? p T cycle

? rsuccess = 2(1? pp) T 1 ; 2


cycle

(A10) (A11) (A12)

Tslice = Wbacko+ Tslot ; 2n 1


3

but this is the silent time observed by one of the stations in a backo . At saturation, most transmissions are preceded by a minimum backo of W ; when n stations uniformly choose a time in W , the gap between choices has mean W=(n +1). We therefore use WTslot =(n +1) to approximate the silence instead, so We can now derive expressions for performance measures like the average number of retransmissions, the average access delay to the channel, etc. Of these, the two that are most important are

Tcycle = Tphysical + TSIFS + TACK + TDIFS + nW 1 Tslot : + S = rsuccess Tpayload ;

(A13)

(A14)

where S is the saturation throughput (i.e. the fraction of channel bandwidth that is used to successfully transmit payload bits) and the total channel utilization

utotal = rsuccess (Tphysical + TACK ) + rcollisionTphysical :

(A15)

References
AS]

E. Arthurs and B.W. Stuck, A theoretical performance analysis of polling and carrier sense collision detection communication systems. In Local Computer Networks (P.C. Ravasio, G. Hopkins and N. Na ah, eds.), North-Holland, Amsterdam (1982), 415{437. BFO] G. Bianchi, L. Fratta and M. Oliveri, Performance evaluation and enhancement of the CSMA/CA MAC protocol for 802.11 wireless LANs, Proc. PIMRC, Taipei, Taiwan (Oct. 1996), 392-396. CG] H.S. Chhaya and S. Gupta, Throughput and fairness properties of asynchronous data transfer methods in the IEEE 802.11 MAC protocol, Proc. PIMRC, Toronto, Canada (Sept. 1995), 613{617. 21

HC] K.C. Huang and K.C. Chen, Interference analysis of nonpersistent CSMA with hidden terminals in multicell wireless data networks, Proc. PIMRC, Toronto, Canada (Sept. 1995), 907{911. HLR] J. Hastad, T. Leighton and B. Rogo , Analysis of backo protocols for multiple access channels, Proc. Symposium on Theory of Computing, New York (May 1987), 241{253. IEEE] P802.11, IEEE Draft Standard for Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Speci cation, D2.0 (July 1995). J] R. Jain, The Art of Computer Systems Performance Analysis, John Wiley & Sons, New York, NY (1991). K] L. Kleinrock, Queuing Systems, Vol. I: Theory, Wiley-Interscience, New York, NY (1975). KT] L. Kleinrock and F.A. Tobagi, Packet switching in radio channels: Part I | Carrier sense multiple-access modes and their throughput-delay characteristics, IEEE Trans. Communications 23, 12 (Dec. 1975), 1400{1416. NI] S.M. Nor and I. Ismail, Performance of CSMA-CA MAC protocol for distributed radio local area networks, Proc. PIMRC, Toronto, Canada (Sept. 1995), 912{916. PSP] I.E. Pountourakis, E.D. Sykas and E.N. Protonotarios, Stability and throughput optimization of multichannel slotted nonpersistent CSMA protocol, Computer Communications 18, 12(Dec.1995), 949{958. RS] R. Rom and M. Sidi, Multiple Access Protocols: Performance and Analysis, Springer-Verlag (1990). S] W. Szpankowski, A multiqueue problem: bounds and approximations. In Performance of Computer-Communication Systems (H. Rudin and W. Bux, eds.), North-Holland, Amsterdam (1984), 349{364. Ta] S. Tasaka, Performance Analysis of Multiple Access Protocols, MIT Press, Cambridge, MA (1986). To] F.A. Tobagi, Multiaccess protocols in packet communication systems, IEEE Trans. Communications 28, 4(Apr. 1980), 468{488. TGS] Y.C. Tay, N. Goodman and R. Suri, Locking performance in centralized databases. ACM Transactions on Database Systems 10, 4 (Dec. 1985), 415{462. TK] H. Takagi and L. Kleinrock, Throughput analysis for persistent CSMA systems, IEEE Trans. Communications COM-33, 7 (July 1985), 627{638. TT] H.H. Tan and K. Tsai, Packet output process of CSMA and CSMA/CD protocols, IEEE Trans. Communications 44, 4(Apr. 1996), 464{474. V] T. Vo-Dai, Throughput-delay analysis of the nonslotted and nonpersistent CSMA-CD protocol. In Local Computer Networks (P.C. Ravasio, G. Hopkins and N. Na ah, eds.), NorthHolland, Amsterdam (1982), 459{476. VE] M. Visser and M. El Zarki, Voice and data transmission over an 802.11 wireless network, Proc. PIMRC, Toronto, Canada (Sept. 1995), 648{652. 22

S-ar putea să vă placă și