13-Analysis.ppt

advertisement

EECS 122:

Introduction to Computer Networks

Transport Analysis

Computer Science Division

Department of Electrical Engineering and Computer Sciences

University of California, Berkeley

Berkeley, CA 94720-1776

Katz, Stoica F04

Outline

 Exponential averaging and its applications

Retransmission timeout (RTO) computation

Little’s Theorem (revisited)

Katz, Stoica F04 2

Exponential Averaging

Let X

1

, X

2

, …, X

N be a series of measurements

Then average value A i computed as after the i -th measurement is

A i

= a A i-1

+ (1 a

) X i where a is a constant between 0 and 1

Note that (assuming A

0

A i

= 0):

= a N-1

(1 a

) X

1

+ a N-2

(1 a

) X

2

+ (1 -

What is the role of a

? What does a control? a

) X

N

Katz, Stoica F04 3

Exponential Averaging: Example

 X constant; A converges to X

X

A

1 2 3 4 5 6 7 8 9 10

… iteration

Katz, Stoica F04 4

Exponential Averaging: Example

 Maintaining queue size in RED

Katz, Stoica F04 5

Exponential Averaging: Example

RTT estimation in TCP

Measure RTT for each packet/ACK pair

Compute average of RTT as

- EstRTT = a x EstRTT + (1 a

) x RTT

a is 0.9 (or 0.8)

Katz, Stoica F04 6

Moving Window Average

Let X

1

, X

2

, …, X

N measurements be a series of

Then average value A i after the measurement is computed as i -th

A i

= ( X i-1

+ X i-2

+ … + X i-w

)/ W

 where W is the window size

How do exponential averaging and moving window averaging compare?

Katz, Stoica F04 7

Outline

 Exponential averaging and its applications

 Retransmission timeout (RTO) computation

Little’s Theorem (revisited)

Katz, Stoica F04 8

RTT

1

Retransmission Timeout (RTO)

Computation: The Problem

1

Timeout

RTT

1

Timeout

1

Timeout too long  inefficiency

Timeout too short  duplicate packets

Katz, Stoica F04 9

RTO Computation: Original Algorithm

 Measure RTT for each packet/ACK pair, then perform

1. EstRTT = a x EstRTT + (1 a

) x RTT, where a is 0.9 (or 0.8)

2. RTO = 2 x EstRTT

Katz, Stoica F04 10

RTO Computation: Jacobson/Karels

Algorithm

Measure RTT for each packet/ACK pair, then perform

1. Err = RTT - EstRTT

2. EstRTT = EstRTT + (1 – a

) x Err

(Note: equivalent to EstRTT = a x EstRTT + (1 a

) x RTT )

3. DevRTT =

(1 b ) x DevRTT + b x | Err|

4. RTO = EstRTT + 4 DevRTT where a

= 0.9 and b

= 1/8

DevRTT represents the mean of the deviation (like standard deviation) of the RTT

Why do we need DevRTT ?

Katz, Stoica F04 11

RTO Computation: Karn/Partridge

Algorithm

 Add the following two considerations to

Jacobson/Karels algorithm

EstRTT is updated only when an ACK is received before the timeout expires. Why?

- If a packet timeouts, double EstRTT . Why?

Katz, Stoica F04 12

Outline

 Exponential averaging and its applications

Retransmission timeout (RTO) computation

Little’s Theorem (revisited)

Katz, Stoica F04 13

Little’s Theorem

Assume a system (e.g., a queue) at which packets arrive at rate a(t)

Let d(i) be the delay of packet i , i.e., time packet i spends in the system

What is the average number of packets in the system? d(i) = delay of packet i a(t) – arrival rate system

 Intuition:

- Assume arrival rate is a = 1 packet per second and the delay of each packet is s = 5 seconds

- What is the average number of packets in the system?

Katz, Stoica F04 14

Little’s Theorem

1

Latest bit seen by time t d(i) = delay of packet i x(t) = number of packets in transit (in the system) at time t

Sender x(t)

2

Receiver time

T

What is the system occupancy, i.e., average number of packets in transit between 1 and 2 ?

Katz, Stoica F04 15

Little’s Theorem

1

Latest bit seen by time t d(i) = delay of packet i x(t) = number of packets in transit (in the system) at time t

Sender x(t)

S= area

T

Average occupancy = S/T

2

Receiver time

Katz, Stoica F04 16

Little’s Theorem

1

Latest bit seen by time t d(i) = delay of packet i x(t) = number of packets in transit (in the system) at time t

Sender

P S(N-1)

S(N) d(N-1)

2

Receiver x(t)

S= area time

T

S = S(1) + S(2) + … + S(N) = P*(d(1) + d(2) + … + d(N))

Katz, Stoica F04 17

Little’s Theorem

1

Latest bit seen by time t d(i) = delay of packet i x(t) = number of packets in transit (in the system) at time t

Sender

P S(N-1)

S(N) d(N-1)

2

Receiver x(t)

S= area time

Average occupancy

T

S/T = (P*(d(1) + d(2) + … + d(N)))/T

= ((P*N)/T) * ((d(1) + d(2) + … + d(N))/N)

Average arrival time Average delay

Katz, Stoica F04 18

Little’s Theorem

1

Latest bit seen by time t d(i) = delay of packet i x(t) = number of packets in transit (in the system) at time t

Sender a(i) S(N-1)

S(N) d(N-1)

2

Receiver x(t)

S= area

T

Average occupancy = (average arrival rate) x (average delay) time

Katz, Stoica F04 19

Download