View
391
Download
0
Embed Size (px)
Citation preview
RTTmatters
Matsuzaki ‘maz’Yoshinobu<[email protected]>
InternetInitiativeJapanInc.(IIJ/AS2497) 12015/11/10
RoundTripTime(RTT)
RTT
t0
t1
InternetInitiativeJapanInc.(IIJ/AS2497) 22015/11/10
TCP3wayhandshakeandRTT
RTTRTT
InternetInitiativeJapanInc.(IIJ/AS2497) 32015/11/10
TCPandRTT
RTT
windowsize=TCPRXbuffer
RTT
RTT
InternetInitiativeJapanInc.(IIJ/AS2497) 42015/11/10
packetlossandRTT
RTO
RTOiscomputedbasedonRTT-- seerfc6298
retransmissiontimeout
InternetInitiativeJapanInc.(IIJ/AS2497) 52015/11/10
RTT
• thelower,thebetter– fasterTCPhandshake– betterTCPthroughput– fasterTCPrecoveryfromapacketloss
• TherearevariouseffortstoimproveTCPperformanceeveninahighlatencysituation
InternetInitiativeJapanInc.(IIJ/AS2497) 62015/11/10
Wi-Fiisgettingpopular
wirelesswired
Internet
server2
server1
InternetInitiativeJapanInc.(IIJ/AS2497) 72015/11/10
Ifacedatrouble
wirelesswired• RTTwasnotstablefromawirelessclienttotheserver2.L
64bytestime=398.122ms64bytestime=316.330ms64bytestime=337.251ms64bytestime=358.155ms64bytestime=299.480ms64bytestime=387.789ms
server2
server1
InternetInitiativeJapanInc.(IIJ/AS2497) 82015/11/10
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
InternetInitiativeJapanInc.(IIJ/AS2497) 92015/11/10
hmmm...
wirelesswired
server2
server1
InternetInitiativeJapanInc.(IIJ/AS2497) 10
64bytestime=296.040ms64bytestime=296.105ms64bytestime=296.442ms64bytestime=296.186ms64bytestime=296.103ms64bytestime=296.070ms
3) fromthewiredhostinthesamenetwork,RTTtotheserver2looksstable
2015/11/10
so...
wireless
server1
server2
wired
• thisstrangebehaviorhappensonlyforthiscombinationL
InternetInitiativeJapanInc.(IIJ/AS2497) 112015/11/10
RTTdistributiontoserver1
fromwiredhosttoserver1 fromwifi hosttoserver1
wired wifi
InternetInitiativeJapanInc.(IIJ/AS2497) 122015/11/10
RTTdistributiontoserver2
fromwiredhosttoserver2 fromwifi hosttoserver2
wired wifi
InternetInitiativeJapanInc.(IIJ/AS2497) 132015/11/10
thewifi APwasbufferingpackets
wirelesswired
Internet
server2
server1
InternetInitiativeJapanInc.(IIJ/AS2497) 14
• andthiscausedtheunstableRTTL
2015/11/10
Mywifi adapterdoessleep
• toreducebatteryusage• beforesleeping,theclientsendanotificationtothewifi AP,andtheAPkeepspacketsuntiltheclientwakeup
• so,myPCwasaskingthebuffering!
InternetInitiativeJapanInc.(IIJ/AS2497) 152015/11/10
wifi APsendsbeacon
• beaconinterval– timeintervalbetweenbeacontransmissions– usually100msec,butit’sconfigurable
• TIM(TrafficIndicationMap)– totellanysleepingclientsiftheAPhasanybufferedframespresentforit
• wifi adaptercansleepbetweenbeacons,andwakeuptocheckabeacon(TIMcanindicateiftheadapterneedtoreceivedataornot)
InternetInitiativeJapanInc.(IIJ/AS2497) 162015/11/10
thescenario
• Mywifi adapterwenttosleepafter200msecofnotraffic– that’swhytheunstableRTThappensonlywhenIwascommunicatingwithserver2(averageRTTis300msec)
• Basedonthebeaconintervalinformation(whichwas100msecinmycase),itwokeupandreceivedaresponse– that’swhymostRTTdistributioniswithin100msec
InternetInitiativeJapanInc.(IIJ/AS2497) 172015/11/10
sleepingandbuffering
InternetInitiativeJapanInc.(IIJ/AS2497) 18
200msecnotraffic
goestosleepuntilthenextbeacon buffered
2015/11/10
Summary• StrangeRTTbehaviorhappensifyourcommunicationisbetween:– ahostconnectedtoawifi networkand– afar endhost(RTT>200msec)
• Yourwifi adaptergoestosleep– “200msecofnotraffic”seemsacommontrigger
• Thesleepdurationismanageablebysettingbeaconintervalofyourwifi AP– 100msecwouldbereasonable– Youmightbeabletoreducebatteryusagebysettingitas1000msec,butthiscouldintroducemoreRTTpenalty
InternetInitiativeJapanInc.(IIJ/AS2497) 192015/11/10