RTT
• Thelower,thebetter– FasterTCPhandshake– BetterTCPthroughput– FasterTCPrecoveryfromapacketloss
• TherearevariouseffortstoimproveTCPperformanceeveninahighlatencysituation
[email protected] IIJ/AS2497 3
Ifacedatrouble
wirelesswired• RTTwasnotstablefromawirelessclienttotheserver2.L
64bytestime=398.122ms64bytestime=316.330ms64bytestime=337.251ms64bytestime=358.155ms64bytestime=299.480ms64bytestime=387.789ms
server2
server1
[email protected] 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
[email protected] IIJ/AS2497 6
hmmm...
wirelesswired
server2
server1
[email protected] 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
[email protected] IIJ/AS2497 8
RTTdistributiontoserver1
fromwiredhosttoserver1 fromwifi hosttoserver1
wired wifi
[email protected] IIJ/AS2497 9
RTTdistributiontoserver2
fromwiredhosttoserver2 fromwifi hosttoserver2
wired wifi
[email protected] IIJ/AS2497 10
WiFi APwasbufferingpackets
wirelesswired
Internet
server2
server1
[email protected] IIJ/AS2497 11
• ThiscausedtheunstableRTTL
MyWiFi adapterdoessleep
• Toreducebatteryusage• Beforesleeping,theclientsendanotificationtothewifi AP,andtheAPkeepspacketsuntiltheclientwakeup
• MyPCwasaskingthebuffering!
[email protected] IIJ/AS2497 12
WiFi APsendsbeacon
• Beaconinterval– timeintervalbetweenbeacontransmissions– usually100msec,butit’sconfigurable
• TIM(TrafficIndicationMap)– totellanysleepingclientsiftheAPhasanybufferedframespresentforit
• WiFi adaptercansleepbetweenbeacons,andwakeuptocheckabeacon(TIMcanindicateiftheadapterneedtoreceivedataornot)
[email protected] IIJ/AS2497 13
Thescenario
• Mywifi adapterwenttosleepafter200msecofnotraffic– that’swhytheunstableRTThappensonlywhenIwascommunicatingwithserver2(averageRTTis300msec)
• Basedonthebeaconintervalinformation(whichwas100msecinmycase),itwokeupandreceivedaresponse– that’swhymostRTTdistributioniswithin100msec
[email protected] IIJ/AS2497 14
Sleepingandbuffering
[email protected] 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.
[email protected] IIJ/AS2497 16