Transcript Document

802.11 fairness ii-2

What is Multi-Rate?

• Ability of a wireless card to automatically operate at several different bit-rates (e.g. 1, 2, 5.5, and 11 Mbps for 802.11b) • Part of many existing wireless standards (802.11b, 802.11a, 802.11g, WiBro … ) • Virtually every wireless LAN card in use today employs multi-rate Due to large SNR variation in radio propagation, many wireless communication technologies support multiple bit rates For example, if SNR is good, we can choose a modulation scheme with many symbols such as 64QAM If SNR is bad, the receiver may not be able to differentiate many kinds of symbols, so a low bit rate modulation scheme like BPSK will be a better choice In addition to modulation techniques, we can also adjust the coding rate of FEC

Digital Modulation

• Phase Shift Keying (PSK): – Pros: • Less susceptible to noise • Bandwidth efficient – Cons: • Require synchronization in frequency and phase  complicates receivers and transmitter t There are three kinds of digital modulation: ASK, FSK, PSK Shift keying means switching. E.g. ASK uses two amplitudes but is vulnerable to noise FSK requires almost twice BW, which leaves us PSK only

Phase Shift Keying

• BPSK (Binary Phase Shift Keying): – bit value 0: sine wave – bit value 1: inverted sine wave – very simple PSK – low spectral efficiency – robust, used in satellite systems 1 Q 0 I 10 Q • QPSK (Quadrature Phase Shift Keying): – 2 bits coded as one symbol – needs less bandwidth compared to BPSK – symbol determines shift of sine wave – Often also transmission of relative, not absolute phase shift: DQPSK - Differential QPSK A 00 11 10 Phase-state diagram, constellation diagram 11 I 01 00 01 t

Quadrature Amplitude Modulation

• Quadrature Amplitude Modulation (QAM): combines amplitude and phase modulation • It is possible to code n bits using one symbol – 2 n discrete levels • bit error rate increases with n Q 0010 0001 0011 a φ 0000 1000 I • • • Example: 16-QAM (4 bits = 1 symbol) Symbols 0011 and 0001 have the same phase

φ

, but different amplitude

a

. 0000 and 1000 have same amplitude but different phase Used in Modem

64 QAM

• 64 - Quadrature Amplitude Modulation – 6 bits per symbol – Also uses quadrature carrier – Each carrier is multiplied by +7, +5, +3, +1, -1, -3, -5, or 7 (amplitude modulation) – 64 possible combinations of the two multiplied carriers

802.11a Rates: Modulation and Coding

To sum up, modulation determines the number of bits per symbol and coding rate tunes the ratio of real data bits and redundant bits 802.11a adopts OFDM that has 48 subcarriers. Each subcarrier has 250K symbol rate The rightmost column aggregates data bits for the OFDM symbol that is made up of 48 subcarriers In the case of the last row, 216 * 250K becomes 54Mbps

Throughput vs. Distance for 802.11a

This plots the measurement results of 802.11a throughput for each bit rate as the distance increases The highest bit rate (54Mbps) is possible only with a few 10s of meters Whereas, the lowest bit rate (6Mbps) maintains its throughput up to almost 200 m In this slide each throughput collapse signifies that TX errors occurs substantially after some distance

802.11b Frame Exchange Duration

4.55 Mbps 11.0

MAC Overhead Data 3.17 Mbps 5.5

2.0

1.0

1.54 Mbps 0.85 Mbps 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

Medium Time (milliseconds)

Medium Time consumed to transmit 1500 byte packet This slide shows how much TX time is taken by each bit rate of 802.11b Obviously, we have to try high bit rate TXs if possible. However, if SNR is not so good, the receiver fails to receive the data correctly.

How can we find out the best bit rate (or modulation scheme) for the current link condition?

• •

Rate adaptation (ARF)

Selects the rate to use for a packet: ARF and RBAR Auto Rate Fallback (ARF) – Adaptive based on success/failure of previous packets • senders attempt to use higher transmission rate after consecutive successes • revert to lower rate after failures – Simple to implement – Doesn ’ t require the use of RTS CTS or changes to 802.11 spec Let me first introduce two rate adaptation schemes ARF is the simplest one that adapts its rate depending on channel quality What happens is the transmitter keeps on counting the number of successful TXs If that number reaches a certain threshold, it raises the link rate If a TX error happens, it falls back to lower rate Maybe ARF is most widely implemented in real products

Rate adaptation (RBAR)

Receiver Based Auto Rate (RBAR) – receiver measures channel quality • SNR measurement of RTS – piggyback in CTS – sender decides transmission rate according to this information – Faster & more accurate in changing channel – Requires some tweaks to the header fields RBAR tries to measure the channel quality more instantly The RX measures the SNR of the RTS packet Then it reports the SNR result to the TX in the CTS frame The TX decides the appropriate link rate from this feedback The demerit of this scheme is that it requires changing the CTS packet format, not to mention using RTS/CTS

MAC Layer Fairness Models •

Per Packet Fairness

: throughput fairness •

Temporal Fairness

: If two adjacent senders are continuously attempting to send packets, they should be able to send for the same

amount of medium time.

• In single rate networks these are the SAME!

We saw this slide already. Note that per-packet fairness is also called throughput fairness assuming the same payload size in a packet

Temporal vs. Throughput Fairness

• Equivalent in single-rate networks • Throughput fairness results in significant inefficiency in multi rate networks

Example

user 1 user 3 access point user 2 Suppose there are three stations and users 2 and 3 are in good link conditions while user 1 suffers from poor radio link

Temporal vs. Throughput Fairness

user 1 Throughput Fair user 1 user 2 user 3 DATA DATA DATA user 2 access point user 3 Even 1 user with low transmission rate results in a very low network throughput In this slide, the x axis is time, not the byte length of the MPDU. Actually the packet size is equal but the TX time is different

Temporal vs. Throughput Fairness

user 1 Temporal Fair user 1 user 2 user 3 DATA DATA DATA DATA DATA DATA DATA DATA DATA DATA DATA DATA DATA user 2 access point user 3 Same time-shares of the channel for different flows, also higher throughput For temporal fairness, each node should occupy the same amount of time as other nodes Temporal fairness not only rectifies the unsuitable throughput fairness but also increases the overall throughput

11 Mbps Link

Temporal Fairness Example

802.11

Packet Fairness OAR Temporal Fairness Per Packet Fairness 11 Mbps 0.896

3.533

1 Mbps 1 Mbps Link 0.713

0.450

Total Throughput 1.609

3.983

Temporal Fairness 11 Mbps 1 Mbps Let me illustrate per packet fairness and temporal fairness. There are two nodes: one node with 11Mbps link and the other with 1Mbps link When per packet fairness is ensured, two flows will TX a data frame alternately to make the number of TXs equal However, for temporal fairness, the time for each flow to use the medium should be the same. So 11Mbps link flow will send more frames for the same time duration

Opportunistic Auto Rate (OAR) • Observation:

– Coherence time (duration where hosts have better channel quality) is at least several packet time

• Idea

– If the channel is of high quality, user can transmit multiple packets – Temporal fairness vs. throughput fairness Now we will talk about OAR which performs rate adaptation with the objective of temporal fairness The key rationale behind OAR is the coherence time during which a channel quality is stable at least several TX times If the channel quality is good, the station can TX multiple frames in a row In this way, a station with high link quality can occupies the channel for the same time as a station with low quality

OAR - Implementation Issues • How to estimate channel condition

– Use ARF, RBAR

• How to transmit several packets

– Utilize 802.11 fragmentation – set

more fragments

bit – clear

fragment number

subfield OAR is link estimation scheme-agnostic Then it uses the fragmentation technique in the current 802.11 standard The sequence control field in 802.11 MAC header consists of two parts

OAR - Benefits • Channel is better utilized, then better throughput • No RTS/CTS for subsequent packets • Reduce contention time per packet • Time fairness

So OAR can ensure temporal fairness Compared to RBAR, it requires one RTS/CTS exchange for a series of fragments

Motivation

• Wireless channel is variable • Received signal: superposition of different reflections, with different delays and attenuations • Coherence time

40 time

15 10 5 0 35 30 25 20 Time (sec)

The channel condition can be highly fluctuating over time It is partly because the received signal is the sum of different EM waves However, when we look at channel condition on the order of TX times, we can observe a relatively stable link

Why is it named opportunistic?

• Exploit the variations inherent in wireless channel to increase throughput user 1 user 2

time

 user 1 user 2 • Maintain

temporal shares

of different flows If the channel condition of each user is dynamically changing, we can opportunistically exploit this variation

O

pportunistic

A

uto

R

ate (OAR)

• Main observation: Coherence time in order of multiple packet transmissions time – If a node accesses the channel and has a

good channel

, let it keep it longer • Given a node with channel access, determine number of packets to transmit as a function of channel quality • OAR: High throughput, while maintaining temporal fairness properties of single rate IEEE 802.11 The key observation underlying OAR is that the coherence time is around time for multiple TXs If a node’s radio link is in good condition, let it go for a duration proportional to its link quality

802.11

802.11b

OAR Pkts 1 1 1

OAR Protocol

Channel Condition Rate 2 2 2 MEDIUM Pkts Rate 1 1 3 2 5.5

5.5

Pkts GOOD Rate 1 1 5 2 11 11

• Rates in IEEE 802.11b: 2, 5.5, and 11 Mbps • Number of packets transmitted by OAR ~ Tx Rate Base Rate

This slide illustrates how OAR is working Suppose the base rate (minimum rate) is 2 Mbps The number of packets consecutively transmitted by a node is proportional to the ratio of its current TX rate to the base rate

802.11

802.11b

OAR Pkts 1 1 1 Rate 2 2 2

RBAR Protocol

Channel Condition MEDIUM Pkts Rate 1 1 3 2 5.5

5.5

  Receiver controls the sender’s transmission rate Control messages sent at

Base Rate

Pkts GOOD Rate 1 1 5 2 11 11

Reservation Sub-Header destination Reservation subheader is nothing but the NAV source

802.11

802.11b

OAR Pkts 1 1 1 Rate 2 2 2

OAR Protocol

Channel Condition MEDIUM Pkts Rate 1 1 3 2 5.5

5.5

 Once access granted, it is possible to send multiple packets if the channel is good

Pkts GOOD Rate 1 1 5 2 11 11

Reservation Sub-Header RTS destination source

IEEE 802.11

Transmitter

R

Receiver

C

Performance Comparison

D1 A

RBAR

Transmitter Receiver

R C D1 A R C D1 A

Observation I

Contention time per packet is the same for RBAR and single-rate IEEE802.11

In RBAR, the frames in yellow box are for the flow with high link quality while the frames in skyblue box are for low rate flow Even though RBAR can let each node select the appropriate bit rate, only one packet is TXed each time

Performance Comparison

IEEE 802.11

Transmitter

R

Receiver

C D1 A

Observation II Transmitter Receiver

R C D1 A

Observation I

R D1 C A R D2 C A D3 D1 A A

Performance Comparison

IEEE 802.11

Transmitter Receiver

R C D1 A

RBAR

Transmitter Receiver

R C

OAR

Transmitter Receiver

R C D1 D1 A A R D2 C A D3 D1 A A

Fairness 101

• Network is logically just a bundle of resources – resource is often bit rate or BW • A number of stations are contending for resource – What can we do about it?

– FIFO – Fairness – maximization Fairness 101 means this is an introductory material about fairness Network is often abstracted by a service. Providing service requires a resource In networks, resource is typically a bit rate (or BW) of a link, If there are multiple nodes contending for the same resource, we should do something about it, which means we have to schedule how to use resource for these users FIFO is often implemented in real network systems for simplicity However, as the service requirements is becoming diverse and complicated, how to distribute or schedule the link bit rate is a vital issue The popular objectives of packet scheduling are to ensure fairness and to maximize throughput and so on

The problems of FIFO queues

1. In order to maximize its chances of success, a source has an incentive to maximize the rate at which it transmits. 2. (Related to #1) When many flows pass through it, a FIFO queue is “ unfair ” – it favors the most greedy flow.

3. It is hard to control the delay of packets through a network of FIFO queues.

The FIFO queue has many drawbacks It implicitly incites a contender to send more traffic to get more share of the resource because FIFO services a flow with more traffic than other flows Also, it is hard to guarantee delay or throughput for each flow as the number of other flows or their traffic increases

B A 10 Mb/s 100 Mb/s

Fairness

0.55

Mb/s 1.1 Mb/s R 1 C 0.55

Mb/s e.g. an http flow with a given (IP SA, IP DA, TCP SP, TCP DP) What is the “fair” allocation: (0.55Mb/s, 0.55Mb/s) or (0.1Mb/s, 1Mb/s)?

The definition of fairness is often somewhat confusing In this scenario, user A keeps on sending traffic at 10Mbps and user B pumps 100Mbps to the same router R1 with the link rate 1.1Mbps

A 10 Mb/s

Fairness

B 100 Mb/s R 1 1.1 Mb/s D C 0.2 Mb/s What is the “fair” allocation?

Now we add one more user C who requests data rate of 0.2 Mbps What is the fair allocation or scheduling of link rate to these three users?

When we talked about 802.11 fairness, we assume every user has saturated traffic (infinite traffic request)

Max-Min Fairness: A common way to allocate BW to flows

N

flows share a link of rate

C

. Flow

f

wishes to send at rate W(

f

) , and is allocated rate R(

f

).

1. Pick the flow,

f

, with the smallest requested rate.

2. If W(

f

) <

C/N

, then set R(

f

) = W(

f

).

3. If W(

f

) >

C/N

, then set R(

f

) =

C/N

.

4. Set

N = N – 1

.

C

=

C

– R(

f

).

5. If

N

> 0 goto 1.

The most widely accepted standard is max-min fairness A user with small demand will get his/her share while a user with large demand will split the rest evenly If the requested rate is smaller than the equal share of the link, C/N, the flow can be assigned what it requested Otherwise, it will be assigned its fair share, which is “what is left of C” over the number of flows

Max-Min Fairness: An example

W(

f

1 ) = 0.1

W(

f

2 ) = 0.5

R 1 1 C W(

f

3 ) = 10 W(

f

4 ) = 5 Round 1: Set R(

f

1 ) = 0.1

Round 2: Set R(

f

2 ) = 0.9/3 = 0.3

Round 3: Set R(

f

4 ) = 0.6/2 = 0.3

Round 4: Set R(

f

3 ) = 0.3/1 = 0.3

First of all, we have to line up the flows in the increasing order of W(f) As f1 requests small rate, it can get what it wants. Then C becomes 0.9 and N is 3

Max-Min Fairness • How can an Internet router

allocate

different rates (BW) to different flows? • First, let

s see how a router can allocate the

same

rate to different flows

… Suppose a router should allocate or schedule the rates (shares) to all the flows by the previous max-min fairness?

How can we design a router to embody this functionality?

For simplicity, let’s start with the same rate allocation case

Fair Queueing

1. Packets belonging to a flow are placed in a FIFO. This is called “ per-flow queueing ” .

2. FIFOs are scheduled one bit at a time, in a round robin fashion. 3. This is called Bit-by-Bit Fair Queueing.

Flow 1 Bit-by-bit round robin Classification Flow N Scheduling In reality, the router will service each flow on a packet-by-packet basis, not bit-by-bit service. However, we will start with bit-by-bit service The reason for bit-level round is to minimize the deviation (uneven service time) among the shares of flows

Weighted Bit-by-Bit Fair Queueing • Likewise, flows can be allocated different rates by servicing a different number of bits for each flow during each round.

R(

f

1 ) = 0.1

R(

f

2 ) = 0.3

R(

f

3 ) = 0.3

R(

f

4 ) = 0.3

R 1 1 C Order of service for the four queues: …

f 1, f 2, f 2, f 2, f 3, f 3, f 3, f 4, f 4, f 4, f 1

,… Also called “Generalized Processor Sharing (GPS)” If different rates are allocated for each flow, this is called weighted fair queueing In this example, for one bit service of f1, other flows will receive service for three bits

Packetized Weighted Fair Queueing (WFQ)

Problem:

We need to serve a whole packet at a time

• • Solution: Determine what time a packet,

p

, would complete if we served flows bit-by-bit. Call this the packet ’ s finishing time,

F p

Serve packets in the order of increasing finishing time.

Theorem:

Packet

p

will depart before

F p

+ TX (P

max

)

Also called “Packetized Generalized Processor Sharing (PGPS)” If all the bits of a packet, p, can be serviced at Fp by bit-by-bit WFQ.

Then,with Packetized WFQ, the packet’s service will be finished no later than Fp + TX(Pmax)

Understanding bit by bit WFQ

4 queues, sharing 4 bits/sec of bandwidth, Equal Weights 6 5 4 3 2 1 0 Time A1 = 4 B1 = 3 C2 = 1 D2 = 2 C1 = 1 D1 = 1 1 1 1 1 Weights : 1:1:1:1 6 5 4 3 2 1 0 Time D1, C1 Depart at R=1 A2, C3 arrive A2 = 2 A1 = 4 B1 = 3 C3 = 2 C2 = 1 D2 = 2 C1 = 1 D1 = 1 1 1 1 1 D1 C1 B1 Round 1 A1 Weights : 1:1:1:1 6 5 4 3 2 1 0 Time C2 Departs at R=2 A2 = 2 C3 = 2 A1 = 4 B1 = 3 C2 = 1 D2 = 2 C1 = 1 D1 = 1 1 1 1 1 D2 C2 B1 Round 2 A1 D1 C1 B1 Round 1 A1 Weights : 1:1:1:1

Understanding bit by bit WFQ

4 queues, sharing 4 bits/sec of bandwidth, Equal Weights 6 5 4 3 2 1 0 D2, B1 Depart at R=3 Time A2 = 2 A1 = 4 1 B1 = 3 D2 C3 B1 A1 D2 C2 B1 A1 D1 C1 1 C3 = 2 C2 = 1 C1 = 1 1 Round 3 Round 2 Round 1 D2 = 2 D1 = 1 B1 1 A1 Weights : 1:1:1:1 6 5 4 3 2 1 0 Time A2 C3, A1 Depart at R=4 Departs at R=6 A2 = 2 C3 = 2 A1 = 4 B1 = 3 C2 = 1 D2 = 2 C1 = 1 D1 = 1 1 1 1 1 A2 6 A2 C3 A1 5 Round 4 D2 C3 B1 Round 3 A1 D2 C2 B1 Round 2 A1 D1 C1 B1 Round 1 A1 Sort packets Weights : 1:1:1:1 6 5 4 3 2 1 0 Time Departure order for packet by packet WFQ: Sort by finish round of packets A2 = 2 C3 = 2 A1 = 4 B1 = 3 C2 = 1 D2 = 2 C1 = 1 D1 = 1 Weights : 1:1:1:1 1 1 1 1 A2 A2 C3 C3 A 1 A 1 A1 A 1 D2 D2 B1 B1 B1 C2 D1 C1

The use of WFQ for (weighted) fairness

• WFQ can be used to provide different rates to different flows.

• Most routers today implement WFQ and can be used to give different rates to different flows. (Not used much yet).

• Different definitions of a flow are possible: Application flow, all packets to a destination, all packets from a source, all http packets, the CEO ’ s traffic, … etc.

Normally, a flow is defined as a stream of packets between two applications and endpoints

Fairness Comparison

I: # of links n i : # of flows over link i n 0 : # of flows over all the links Source of this slide and the following: Andrzej Duda