RTT matters - ENOG · RTT matters Matsuzaki‘maz’ Yoshinobu maz@iij.ad.jp -IIJ/AS2497 1. Round...

Post on 08-Jul-2020

1 views 0 download

Transcript of RTT matters - ENOG · RTT matters Matsuzaki‘maz’ Yoshinobu maz@iij.ad.jp -IIJ/AS2497 1. Round...

RTTmatters

Matsuzaki ‘maz’Yoshinobu<maz@iij.ad.jp>

maz@iij.ad.jp- IIJ/AS2497 1

RoundTripTime(RTT)

RTT

t0

t1

maz@iij.ad.jp- IIJ/AS2497 2

RTT

• Thelower,thebetter– FasterTCPhandshake– BetterTCPthroughput– FasterTCPrecoveryfromapacketloss

• TherearevariouseffortstoimproveTCPperformanceeveninahighlatencysituation

maz@iij.ad.jp- IIJ/AS2497 3

WiFi isgettingpopular

wirelesswired

Internet

server2

server1

maz@iij.ad.jp- IIJ/AS2497 4

Ifacedatrouble

wirelesswired• RTTwasnotstablefromawirelessclienttotheserver2.L

64bytestime=398.122ms64bytestime=316.330ms64bytestime=337.251ms64bytestime=358.155ms64bytestime=299.480ms64bytestime=387.789ms

server2

server1

maz@iij.ad.jp- IIJ/AS2497 5

let’strytoisolatetheproblem

wireless

64bytestime=169.588ms64bytestime=170.666ms64bytestime=169.793ms64bytestime=168.185ms64bytestime=169.783ms64bytestime=169.957ms

server164bytestime=3.757ms64bytestime=3.789ms64bytestime=3.768ms64bytestime=3.718ms64bytestime=3.644ms64bytestime=3.762ms

1) ThelocalWiFi networklooksprettystable

2) RTTtoserver1looksalsostable

server2

maz@iij.ad.jp- IIJ/AS2497 6

hmmm...

wirelesswired

server2

server1

maz@iij.ad.jp- IIJ/AS2497 7

64bytestime=296.040ms64bytestime=296.105ms64bytestime=296.442ms64bytestime=296.186ms64bytestime=296.103ms64bytestime=296.070ms

3) Fromthewiredhostinthesamenetwork,RTTtotheserver2looksstable

so...

wireless

server1

server2

wired

• ThisstrangebehaviorhappensonlyforthiscombinationL

maz@iij.ad.jp- IIJ/AS2497 8

RTTdistributiontoserver1

fromwiredhosttoserver1 fromwifi hosttoserver1

wired wifi

maz@iij.ad.jp- IIJ/AS2497 9

RTTdistributiontoserver2

fromwiredhosttoserver2 fromwifi hosttoserver2

wired wifi

maz@iij.ad.jp- IIJ/AS2497 10

WiFi APwasbufferingpackets

wirelesswired

Internet

server2

server1

maz@iij.ad.jp- IIJ/AS2497 11

• ThiscausedtheunstableRTTL

MyWiFi adapterdoessleep

• Toreducebatteryusage• Beforesleeping,theclientsendanotificationtothewifi AP,andtheAPkeepspacketsuntiltheclientwakeup

• MyPCwasaskingthebuffering!

maz@iij.ad.jp- IIJ/AS2497 12

WiFi APsendsbeacon

• Beaconinterval– timeintervalbetweenbeacontransmissions– usually100msec,butit’sconfigurable

• TIM(TrafficIndicationMap)– totellanysleepingclientsiftheAPhasanybufferedframespresentforit

• WiFi adaptercansleepbetweenbeacons,andwakeuptocheckabeacon(TIMcanindicateiftheadapterneedtoreceivedataornot)

maz@iij.ad.jp- IIJ/AS2497 13

Thescenario

• Mywifi adapterwenttosleepafter200msecofnotraffic– that’swhytheunstableRTThappensonlywhenIwascommunicatingwithserver2(averageRTTis300msec)

• Basedonthebeaconintervalinformation(whichwas100msecinmycase),itwokeupandreceivedaresponse– that’swhymostRTTdistributioniswithin100msec

maz@iij.ad.jp- IIJ/AS2497 14

Sleepingandbuffering

maz@iij.ad.jp- IIJ/AS2497 15

200msecnotraffic

goestosleepuntilthenextbeacon buffered

Summary• StrangeRTTbehaviorhappensifyourcommunicationis

between:– ahostconnectedtoawifi networkand– afar endhost(RTT>200msec)

• AWiFi adaptergoestosleep– “200msecofnotraffic”seemsacommontrigger

• ThesleepdurationismanageablebysettingbeaconintervalonyourWiFi AP– 100msecwouldbereasonable– Youmightbeabletoreducebatteryusagebysettingitas

1000msec,butthiscouldintroducemoreRTTpenalty– YoucanenableU-APSDifyourAPsupportsitsothatclientscan

actuallyschedulethedurationbyitself.

maz@iij.ad.jp- IIJ/AS2497 16