25
Explicit Congestion Explicit Congestion Notification Notification ECN ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

  • View
    219

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Explicit Congestion NotificationExplicit Congestion NotificationECNECN

Tilo HamannTechnical University Hamburg-Harburg, Germany

Page 2: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

OutlineOutline

• Motivation for ECN• How ECN works• Benefits of ECN• New-ECN TCP

– Algorithm

– Simulation results

– Some numbers

• Conclusions

Page 3: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

Motivation for ECNMotivation for ECN

• TCP relies on packets drops to detect congestion– usually caused by queue overflow at a gateway

many connections see packet drops synchronization of loss greater variance in queueing delay

• Solution: active queue management (e.g. RED)• avoids synchronization of loss across multiple flows

• tries to maintain a smaller average queue size

• attempts to increase fairness

• but packet drops are still the indication of congestion

Page 4: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

Motivation for ECNMotivation for ECN

• ECN uses “marked” instead of dropped packets for congestion indication

• ECN can react to congestion before packets get lost

• ECN avoids transmission delay due to unnecessary packet drops:– TCP sender does not need to wait for timeouts or

duplicate ACKs

• currently ECN is only defined for data packets– congestion in the ACK path is open for future research

Page 5: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

How ECN works: TCP headerHow ECN works: TCP header

• ECN makes use of four bits in the TCP header:– ECN Capable Transmission (ECT) bit: DS field, bit 6 – Congestion Experienced (CE) bit: DS field, bit 7

(these two bits are currently listed unused in RFC2474 (DiffServ))

– ECN echo flag: reserved field, bit 9

– Congestion Window Reduced (CWR) flag: reserved field, bit 8

• Definitions:– ECT packet: a data packet of a ECN capable connection– CE packet: a marked ECT packet (ECT bit = 1, CE bit = 1)

– ECN echo packet: an ACK with ECN echo flag set to 1

Page 6: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

How ECN works: connection setupHow ECN works: connection setup

• Connection setup phase:– TCP sender and receiver negotiate their ECN capability

during connection setup• TCP sender sets the ECN echo flag and CWR in the SYN

packet

• TCP receiver sets, if also ECN capable, only the ECN echo flag in the SYN-ACK packet

• If and only if both are ECN capable, the ECT bit gets set in every data packet

Page 7: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

How ECN works: Gateway, TCP ReceiverHow ECN works: Gateway, TCP Receiver

• If a ECT packet arrives at a RED gateway– it gets marked randomly (RED algorithm) if

• the average queue size is greater than minth and

• less than maxth

– it gets always dropped if• average queue size is greater than maxth

• the queue is full

• After the receiver gets a CE packet, the ECN echo flag gets set in the next outgoing ACK

• The receiver continues to set the echo bit until it receives a data packet with the CWR flag set

Page 8: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

How ECN works: TCP senderHow ECN works: TCP sender

• TCP should react to a ECN echo packet like it would to a lost packet:– cut the congestion window: cwnd_ = ½ ·cwnd_

– and reduce the slow start threshold

• But TCP should not– increase cwnd_ for a ECN echo ACK

– trigger an slow start in TCP-Tahoe

– wait for roughly a half RTT in the fast recovery phase of TCP-Reno

Page 9: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

How ECN works: TCP senderHow ECN works: TCP sender

• TCP should react at most once per RTT to any congestion indication, including– timeout of the retransmit timer

– duplicate ACKs

– ECN echo ACK

• TCP should set the CWR flag in the next outgoing packet after it has reduced its congestion window for any reason

Page 10: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

Benefits of ECNBenefits of ECN

• Benefits for short web transfers:– most of TCP loss recovery is expected to be with

timeouts

– worst case: first packet gets dropped

– ECN reduces packets drops

• Bulk data transfers• Real time flows (Non-TCP)

Page 11: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

• ECN-TCP is biased against connections with longer RTTs

• Question:Can we use the marks to achieve a fair sharing of the available bandwidth?

• Approach:– reduce window and

– reduce the slope of the window-increase for each marked packet

– increase window for each regular ACK and– increase slope every RTT while receiving regular ACKs

New-ECNNew-ECN

Page 12: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

New-ECN: AlgorithmNew-ECN: Algorithm

• Regular ACK received:

– increase window:

– if ((First_Mark_Received_ = 1) &&

(Not_Increased_within_the_last_RTT)) {

}

• TCP initialization: – First_Mark_Received_ = 0–

DScwnd

cwndcwnd

1

2RTTSS DD

1DS

Page 13: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

New-ECN: AlgorithmNew-ECN: Algorithm

• Marked packet received:– First_Mark_Received_ = 1

– if (seqno_Ack_ recover_ ) {

recover_ = maxseq_}

cwndcwnd 1DD SS 2

ssthreshssthresh 1

Page 14: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

New-ECN: ns simulation parametersNew-ECN: ns simulation parameters

• RED:– pmax = 0.1

– maxth = 20

– minth = 10

– wq = 0.002

• Network topology:

• New-ECN: 1 = 0.9

2 = 0.9

= 16

– tcpTick_ = 0.01

– packet size: 512byte

Page 15: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

4 New-ECN connections 4 New-ECN connections (Test 10)(Test 10)

Link 1: 10Mbps, 1ms 4ms

Link 2: 10Mbps, 14ms 30ms

Link 4: 10Mbps, 94ms 190ms

Link 3: 10Mbps, 34ms 70ms

Gateway Link 7: 10Mbps, 1ms

Page 16: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

4 New-ECN connections 4 New-ECN connections (Test 10)(Test 10)

TCP3: 70ms

TCP4: 190ms

TCP2: 30ms

TCP1: 4ms

TCP1: 4msTCP2: 30ms

TCP3: 70ms

TCP4: 190ms

Page 17: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

4 New-ECN vs. 4 ECN connections 4 New-ECN vs. 4 ECN connections (Test 7)(Test 7)

New-ECN

190ms

30ms

4ms70ms

Page 18: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

TCP-Friendliness (1) TCP-Friendliness (1) (Test 8)(Test 8)

Link 1: 10Mbps, 14ms 30ms

Gateway Link 7: 5Mbps, 1ms

ECN

New-ECN

Page 19: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

TCP-Friendliness (2) TCP-Friendliness (2) (Test 1)(Test 1)

New-ECN

30ms

70ms

70ms

4ms

30ms

4ms

Page 20: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

TCP-Friendliness (3) TCP-Friendliness (3) (Test 2)(Test 2)

New-ECN

30ms

70ms

70ms

4ms

30ms

4ms

Page 21: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

4 New-ECN connections (2) 4 New-ECN connections (2) (Test 9)(Test 9)

70ms30ms

190ms

4ms

30ms70ms

4ms

190ms

Page 22: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

4 New-ECN connections (3) 4 New-ECN connections (3) (Test 9)(Test 9)

70ms

30ms

190ms

4ms

30ms70ms

4ms

190ms

Page 23: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

New-ECN: some numbersNew-ECN: some numbers

• 4 New-ECN TCP connections:– Fairnessindex:

– TCP-Friendliness (Test 8):

9873.0

4: 4

1

2

24

1

i i

i i

X

XFairness

• 4 ECN TCP connections:– Fairnessindex:

4815.0

4: 4

1

2

24

1

i i

i i

X

XFairness

MbpspRTT

BT

drop

packet 75.45.1

:min

32

Page 24: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

New-ECN: some numbers (2)New-ECN: some numbers (2)

• seems to be proportional to RTT with 1< <2

– where and

is ranges over 1 to a few RTT

DS

W

W

0W

t

RTTSRTT

wwW D 22ˆ

2

0,0

sconnectionsconnectionD RTTwRTTS #, #, 00,

Page 25: Explicit Congestion Notification ECN Tilo Hamann Technical University Hamburg-Harburg, Germany

Tilo [email protected]

ConclusionsConclusions• It is possible to achieve fairness by using the

congestion feedback provided by ECN• New-ECN seems to be TCP friendly • Some potential problems:

– How to choose the design parameters?

– Interaction between TCP-Reno and New-ECN TCP

• Future work:– multiple congested gateways

– more congestion indication bits?

• ECN Home-Page: – http://www.aciri.org/floyd/ecn.html