Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

TCPWindowSizeforWWAN

JimPanian Qualcomm

June17,2004

PCCA

TCPWindowSizeforWWAN
RoleofTCPWindowing CalculationofOptimumWindowSize WWANWindowSizeRequirements WWANandLongFatNetworks Conclusions

June17,2004

PCCA

RoleofTCPWindowing
TCPWindowingservesthreepurposes: 1) Optimizethedataflowthroughthepipe 2) FlowControl 3) CongestionControl

June17,2004

PCCA

TCPWindowingreflectsthenumberofsegmentsintransit thathavenotbeenacknowledged
1 2 3 4 5 6 7 8 9 10 Segment4 5 6
HostA

7 8 ACK4

HostB

1 2 3 4 5 6 7 8 9 10 9
June17,2004 PCCA 4

TCPWindowingoptimizesdataflowundernormal conditions
WindowSizeisjustright

HostA

HostB

WindowSizeistoosmall

June17,2004

PCCA

TCPWindowsizereflectsthesizeofthereceivebufferon receivinghost

TCPSegment(ReceiveWindowSize) or TCPACK(ReceiveWindowSize)

HostA

HostB

HostBprovidesfeedback onReceiveWindowSize.

June17,2004

PCCA

TCPWindowingprovidesflowcontrol

TCPACK(SmallerReceiveWindow Size)

HostA

HostB

HostBcanshrinktheReceive WindowSizeifithasless bufferspace.Usedtoprevent bufferoverruns.

June17,2004

PCCA

TCPWindowingprovidescongestioncontrol

HostA

Congestionmayoccurwhen anintermediatehosthasa bufferoverrunanddropsIP datagramscontainingTCP segments.

HostB

Intermediate Host

Segment5

June17,2004

PCCA

TCPWindowingprovidescongestioncontrol
1 2 3 4 5 6 7 8 9 10

Segment5 6
HostA

7 8 ACK5

HostB

1 2 3 4 5 6 7 8 9 10 5 6
June17,2004 PCCA 9

MaxTCPReceiveWindowSize(MRWS)is64KBytes

TCPSegment(WS=TCPMRWS) or TCPACK(WS=TCPMRWS)

HostA

HostB

Theoreticalmaximumreceive windowsizeis64KBytes. Lowervaluesofmaximum receivewindowsizemaybe configured.


June17,2004 PCCA 10

RoleofTCPWindowingThemaximumreceivewindow sizecanbesetbytheOperatingSystem
Example:MicrosoftWindowsprovidesregistryparameters TcpWindowSizeThisparameterdeterminesthemaximumTCPreceive windowsizeoffered.Thisparameterisbothaperinterfaceparameter andaglobalparameter,dependinguponwheretheregistrykeyis located.OverridesGlobalMaxTcpWindowSize. GlobalMaxTcpWindowSizeThisparametercanbeusedtosetaglobal limitfortheTCPwindowsizeonasystemwidebasis.

June17,2004

PCCA

11

RoleofTCPWindowingThemaximumreceivewindow sizecanalsobesetbytheapplication Example:Microsoft Windowsprovidesthe setsockoptWindows Socketsfunction (onapersocketbasis). Question:Howdoesan applicationknowhowto setWindowsize intelligently?
Application Ex.FTP

HostB

June17,2004

PCCA

12

CalculationofMaxReceiveWindowSize

WindowSizeisjustright

HostA

HostB

MaxReceiveWindowSize=BandwidthxDelay (BandwidthDelayProduct)
June17,2004 PCCA 13

WhycalculatetheMaxReceiveWindowSize?
IftheMaxReceiveWindowSizeistoosmall,itcanconstrain throughput. IftheMaxReceiveWindowSizeistoobig,thenwhenIPdatagrams arelostduetocongestionmoreTCPsegmentsmayhavetobe retransmittedwhichisadragonperformance. MaxReceiveWindowSize=NxMaximumSegmentSize(MSS)to avoidfragmentation.Example:(1460X16,1460X32,1460X40and soon).

June17,2004

PCCA

14

CalculationofMaxReceiveWindowSize
MaxReceiveWindowSize=BandwidthxDelay TheBandwidthishowfastthetransmissionmediumisofthe slowestlinkinthepath.
Example:BandwidthforEthernetis10Mbits/second.

Delay(roundtrip)iscausedbyanumberoffactors:
Serializationdelayoftheindividualcircuitsornetworks Transmissiondelayoftheindividualcircuitsornetworks Processingdelayofthenetworkdevices CanbemeasuredusingPING

June17,2004

PCCA

15

Applicationlayerflowcontrolwithsmallerwindowsizeor chattinesscannegatetheeffectofReceiveWindowSize
Application Application

Segment4 5
HostA

6 7 8 ACK4
HostB

1 2 3 4 5 6 7 8 9 10 9
June17,2004 PCCA 16

WindowSizeCalculationforEthernet

Example:ThedefaultMaxReceiveWindowSizeforWindows2000 isdesignedforEthernetLANsandis17.5KBytes(MSSx12). Assumptions:Bandwidth=10Mbits/secondDelay=10msecs. CalculateMinimumWindowSize: MinimumWindowSize=10Mbits/secondx.01seconds


8bits/Byte =12KBytes<17.5KBytes

SoaMRWSof17.5KBytesissuitableforEthernet
June17,2004 PCCA 17

WWANWindowSizeRequirementsWWANthroughput mustnotbeconstrainedbyasmallWindowsize
AsmallWindowSizecanconstrainahighthroughputwirelesslink Example:ThedefaultWindows2000MaxReceiveWindowSizeis designedforEthernetLANsandis17.5KBytes. UsingPING,itisdeterminedthatCDMA20001xEVDOhasan averageroundtripdelayof269msecs. MaximumThroughputlimitedbyWindowSize 65KBytes/second(520Kbits/second)=17.5KBytes/269msecs CDMA1xEVDOhasexhibiteddownloadspeedsof: 87KBytes/second(694Kbits/second)
June17,2004 PCCA 18

WirelessMaxReceiveWindowSize(MRWS)versus OperatingSystem
Wireless Technology BW (KBytes/sec) Delay (msec) Theoretical MRWS (KBytes) Win98 MRWS 2KBytes Win2K MRWS 17.5KBytes WinXP MRWS 64KBytes

CDPD GPRS EDGE UMTS CDMA 2000 1xEVDO


June17,2004

0.747 3.07 16.88 14.25 86.78

717 1404 600 340 269

0.54 4.31 10.13 4.85 23.34

OK Toosmall Toosmall Toosmall

OK OK OK OK

OK OK OK OK OK

Toosmall Toosmall

PCCA

19

WirelessMaxReceiveWindowSize(MRWS)versus OperatingSystem
CDPD,GPRS,EDGEnumberstakenfrompreviouslypublishedPCCAWorkshop resultsonmembersonlysite. UMTSnumberstakenfromhttp://www.comnets.uni bremen.de/itg/itgfg521/aktuelles/fgtreffen 200204/ITG_FG521_Hamburg_200204_TimmGeil.pdf CDMA20001xEVDOnumbersobservedfrommyowntesting. Windows98numberobservedonmyownpersonalcomputer.WindowsXP numberobtainedfrommyworkcomputer.Windows2Knumberobtainedfrom http://www.microsoft.com/technet/itsolutions/network/deploy/depovg/tcpip2k.asp Thenumbersonthepreviouspagearenotmeanttonecessarilyrepresenttypical networksbutshowthepotentialdiversityofcharacteristicsacrosswireless networksanddevices.ItisadvisedthatITprofessionalstaketheirown measurementstoperformtechnologyevaluations.
June17,2004 PCCA 20

Recommendation:ITprofessionalsadjustTCPMax ReceiveWindowSizeforWirelessDataModems
ItisrecommendedthatITprofessionalsdeterminetheoptimum WindowSizefortheirwirelessdatatechnologyofchoiceandadjust settingsinthecomputerifneeded. Theconceptsaretooobtuseforenduserstodealwith.

June17,2004

PCCA

21

Recommendation:ITprofessionalsadjustTCPMax ReceiveWindowSizeforWirelessDataModems
Apossibleprocedure:
1) SettheTCPMaximumReceiveWindowSizetoNxMaximumSegment Sizeintheoperatingsystem.Starthigh(closeto64K). 2) MeasuredelaybyPING. 3) MeasurethroughputbyperformingFTPonnoncompressibleZIPfiles. 4) CalculatethetheoreticalTCPMaximumReceiveWindowSizebased uponavailabledata. 5) Repeat14makingtheWindowsizesmallertoverifythatthroughputis notadverselyaffectedbyaWindowSizethatistoolarge. 6) FinalsettingSetTCPMaximumReceiveWindowSizeforthedeviceto avaluegreaterthanthetheoreticalvalue:
1) Adjusteitherintheoperatingsystem(Registry)orthroughapplication settings. 2) Makeanevennumbermultipleofmaximumsegmentsize(ex.Nx1460 bytes)toavoidfragmentation.
June17,2004 PCCA 22

Recommendation:ITprofessionalsadjustTCPMax ReceiveWindowSizeforWirelessDataModems
ITprofessionalsshouldalsoanalyzetheirapplicationsfor applicationlevelflowcontrolorexcessivechattiness.Botheffects cannegatetheMaxTCPWindowSizeSetting.

June17,2004

PCCA

23

Willfuture3GWirelessDataNetworksbeconsidered LongFatNetworks(LFNs)?
LFNsrequireMaxReceiveWindowSize>64KBytes.

Long=HighDelay
HostA HostB

Fat=HighThroughput

HighDelayistypicallyduetolonggeographicdistanceofthepipe.
June17,2004 PCCA 24

1GigEthernetisaLongFatNetwork
8.75MBytesMaxReceiveWindowSize>64KBytes.

HostA

Long=HighDelay (70msecs)
HostB

Fat=HighThroughput (1Gbits/second)

Example:1GEthernetfeedsintoa2.4GbpsOC48linkthatgoescrosscountry.
June17,2004 PCCA 25

Willfuture3GWirelessDataNetworksbecomeLongFat Networks?
ALongFatNetwork(LFN)hasa MaxReceiveWindowSize>64KBytes
Example:1GEthernet.

RFC1323providesWindowScaling
EnablesMaxReceiveWindowSizetobescaledfrom64KBytesto 1GBytes.

Does3GWWANapproachLFN?
IfTCPMaxReceiveWindowSizeexceeds64KthenRFC1323extensions arerequired.

June17,2004

PCCA

26

Willfuture3GWirelessDataNetworksbecomeLongFat Networks?
Wireless Technology MaxPhysical LayerBW (Mbits/sec) MaxPhysical LayerBW (KBytes/sec) Delay (msec) Theoretical Physical LayerMRWS (KBytes) 85

UMTS 2.0 CDMA2000 1xEVDO RevisionA CDMA2000 DoubleDO


June17,2004

250

340

3.1

388

269

104

5.0

625
PCCA

269

169
27

Itisuncleariffuture3GWirelessDataNetworkswill becomeLongFatNetworks
IfsimplyconsideringTheoreticalPhysicalLayerMRWS,thenfuture 3GnetworkswouldbeLFNs. However,actualTCPthroughputusedtocalculateMRWSistypically lessthanthephysicallayerthroughputbecauseof:
Higherlayerprotocoloverhead . Timedivisionmultiplexingoftheradioresourcewithinacellacross multipleusers SignaltonoiseratiooftheWWANmodemmayaffectthroughput.

June17,2004

PCCA

28

OperatingSystemscurrentlysupportRFC1323Extensions forWindowScaling
Example:MicrosoftWindowsprovidesregistryparameters TcpWindowSize,GlobalMaxTcpWindowSize Tcp1323Opts ThisparametercontrolsRFC1323timestampsand windowscalingoptions. 0 1 2 3 (disableRFC1323options) (windowscaleenabledonly) (timestampsenabledonly) (bothoptionsenabled)

June17,2004

PCCA

29

Conclusions
TCPMaxReceiveWindowSizemustbeconfiguredtobelarge enoughtonotconstrainthethroughputoverthewirelessnetwork. WirelessnetworkshavedifferentrequirementsforTCPMaxReceive WindowSizeduetovaryingthroughputanddelaycharacteristics. Differentoperatingsystemsandcomputershavedifferentdefault settingsforTCPMaxReceiveWindowSize. TCPMaxReceiveWindowSizeshouldbecalculatedbyanITperson andsetcorrectlyincomputersusingwirelessmodems. Ifpossible,thesettingshouldeitherbeperdeviceorperconnection butnotglobal.
June17,2004 PCCA 30

You might also like