Sign in
Neil Carpenter's Blog
Forefront products, WSUS, Security Incident Response, and whatever else comes up.
Options
Blog Home
Email Blog Author
Share this
RSS for posts
Atom
RSS for comments
Search Blogs
Tags
Antigen
AntiVirus
Anti-Virus
ASP
asp.net
AV
Forefront
FSSMC
General
humor
Incident Response
iphone
Mobile
Networking
Pages
Security
SQL
Tool
Archive
Archives
November 2009
(1)
October 2008
(2)
August 2008
(2)
July 2008
(3)
June 2008
(1)
May 2008
(4)
April 2008
(2)
March 2008
(3)
August 2007
(2)
July 2007
(2)
June 2007
(2)
October 2004
(4)
June 2004
(7)
Quick Figuring Optimal TCP Window Size
TechNet Blogs
>
Neil Carpenter's Blog
>
Quick Figuring Optimal TCP Window Size
Quick Figuring Optimal TCP Window Size
neilcar
26 Oct 2004 10:40 AM
Comments
2
There generally isn't a single correct way to figure out the optimal TCP window for an interface since you're probably connecting to different hosts across different links at different latencies; however, you can roughly guess what the optimal window would be if you're only primarily worried about your communication with one other host (or, perhaps, one other site). First, you'll need to know the latency and the throughput available between you & the remote host. To get the latency, ping the remote host and take the average response time. For the throughput, take the slowest link between you & the remote host (ie, you might both be connected to 100Mb/s Ethernet, but there is a 1.5Mb/s WAN link between). If the slowest link is asymmetrical, use the faster of the two speeds -- for example, on an ADSL connection that was rated as 1.5Mb/s down and 384Kb/s up, use the 1.5Mb/s speed. (If both ends are on DSL, use the lower speed as this will always be the limiting factor.)
Once we've got these two numbers, the normal formula used to calculate optimal TCP window is
bandwidth * latency = window
. Remember that throughput is measured in
bits
per second whereas our TCP window is going to be configured in
bytes
per second. Divide the throughput by 8 to convert bits per second to bytes per second.
So, if we were using a 1.5Mb/s ADSL link with 70ms of latency, our calculation would look something like this:
(1.5*1024*1024/8)bytes/second * .07seconds = ~13763bytes
So, on this link, a 13KB TCP window would work well. Since the default TCP window for Windows 2000/XP/2003 is 16K (or more), there would be no need to change the window on this client; however, if either the throughput or the latency was higher, we would probably benefit from a change.
2 Comments
Networking
Comments
Loading...