<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Quick Figuring Optimal TCP Window Size</title><link>http://blogs.technet.com/neilcar/archive/2004/10/26/247886.aspx</link><description>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</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Quick Figuring Optimal TCP Window Size</title><link>http://blogs.technet.com/neilcar/archive/2004/10/26/247886.aspx#248627</link><pubDate>Wed, 27 Oct 2004 21:16:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:248627</guid><dc:creator>vincentv@microsoft.com</dc:creator><description>I took your formula Neil and put it into a command line c++ quick app. &lt;br&gt;&lt;br&gt;Instructions:&lt;br&gt;1. Use VS6    &lt;br&gt;2. New -&amp;gt;  Win32 Console App -&amp;gt; Hellow World    &lt;br&gt;3. Paste the code below in.  &lt;br&gt;&lt;br&gt;Disclaimer:&lt;br&gt;It worked for me. Well except that it might not round up correctly (but that is just 1 byte). :)&lt;br&gt;&lt;br&gt;Thanks for your blog.&lt;br&gt;&lt;br&gt;// tcpwindow.cpp : Defines the entry point for the console application.&lt;br&gt;//&lt;br&gt;&lt;br&gt;#include &amp;quot;stdafx.h&amp;quot;&lt;br&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br&gt;#include &amp;lt;string.h&amp;gt;&lt;br&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;int main(int argc, char* argv[])&lt;br&gt;{&lt;br&gt;	float pingRTT;&lt;br&gt;	float bandwidth;&lt;br&gt;&lt;br&gt;&lt;br&gt;	char* pingExample = &amp;quot;c:\\&amp;gt;ping slow-msg-51\n\n\tReply from 17.54.12.19: bytes=32 time=176ms TTL=56\n\tReply from 17.54.12.19: bytes=32 time=114ms TTL=56\n\tReply from 17.54.12.19: bytes=32 time=117ms TTL=56\n\tReply from 17.54.12.19: bytes=32 time=171ms TTL=56\n&amp;quot;;&lt;br&gt;	char* pingExample2 = &amp;quot;\n\tPing statistics for 17.54.12.19:\n\t   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),\n\tApproximate round trip times in milli-seconds:\n\t    Minimum = 114ms, Maximum = 176ms, Average = 144ms\n\n&amp;quot;;&lt;br&gt;&lt;br&gt;	printf(&amp;quot;===================================\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;     The TCPWindow Size Tool\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;===================================\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;\n\n&amp;quot;);&lt;br&gt;&lt;br&gt;	printf(&amp;quot;STEP  1: Find the RTT:\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;======================\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;Example: \n&amp;quot;);&lt;br&gt;	printf(&amp;quot;\t&amp;quot;);  &lt;br&gt;	printf(&amp;quot;%s&amp;quot;,pingExample);	&lt;br&gt;	printf(&amp;quot;%s&amp;quot;,pingExample2);	&lt;br&gt;	printf(&amp;quot;Note ---&amp;gt; Approximate round trip times in milli-seconds:\n\t ... Average = 144ms\n\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;\n\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;========================================================\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;What is the Approximate round trip times for your issue?\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;========================================================\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;    Action: Type in the seconds value (if rtt was 144 then enter \&amp;quot;.144\&amp;quot;)\n        and press ENTER\n\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;RTT Value: &amp;quot;);&lt;br&gt;	scanf(&amp;quot;%f&amp;quot;,&amp;amp;pingRTT);&lt;br&gt;&lt;br&gt;&lt;br&gt;	printf(&amp;quot;\n\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;STEP  2: State the bandwidth:\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;==============================\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;Example: \n\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;\t&amp;quot;);  &lt;br&gt;	printf(&amp;quot;This is the WAN bandwidth. An example could be 1.44, 5, 10, 45, etc...\n&amp;quot;);	 &lt;br&gt;	printf(&amp;quot;\n\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;=====================================================\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;What is the the available bandwidth of your WAN link?\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;=====================================================\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;    Action: Type in the value (i.e. 1.5) and press ENTER\n\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;Value: &amp;quot;);&lt;br&gt;	scanf(&amp;quot;%f&amp;quot;,&amp;amp;bandwidth);&lt;br&gt;	printf(&amp;quot;\n\n&amp;quot;);&lt;br&gt;&lt;br&gt;	printf(&amp;quot;You have specified: %f as the RTT.\n&amp;quot;,pingRTT);&lt;br&gt;	printf(&amp;quot;You have specified: %f for the bandwidth.\n&amp;quot;,bandwidth);&lt;br&gt;&lt;br&gt;&lt;br&gt;	printf(&amp;quot;\n\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;STEP  3: Do the numbers:\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;==============================\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;Step1: ([BANDWIDTH]*1024*1024/8)bytes/second * [ROUND TRIP] = [TCP WINDOW]\n\n&amp;quot;);&lt;br&gt;	printf(&amp;quot;Step2: (%f*1024*1024/8)bytes/second * (%f) = [TCP WINDOW]\n\n&amp;quot;,pingRTT,bandwidth);&lt;br&gt;	int step3;&lt;br&gt;	step3 = (pingRTT * 1024*1024/8);&lt;br&gt;	printf(&amp;quot;Step3: (%f) * (%f) = [TCP WINDOW]\n\n&amp;quot;,step3,bandwidth);&lt;br&gt;	float step4;&lt;br&gt;	step4 = step3 * bandwidth;&lt;br&gt;	printf(&amp;quot;Step4: %f = [TCP WINDOW]\n\n&amp;quot;,step4);&lt;br&gt;	printf(&amp;quot;Step4: TCPWindowSize = %d\n\n&amp;quot;,int(step4));&lt;br&gt;	&lt;br&gt;	return 0;&lt;br&gt;}</description></item><item><title>re: Quick Figuring Optimal TCP Window Size</title><link>http://blogs.technet.com/neilcar/archive/2004/10/26/247886.aspx#248629</link><pubDate>Wed, 27 Oct 2004 21:19:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:248629</guid><dc:creator>Neilcar</dc:creator><description>Glad you found it useful!  I'd like to start getting more network-oriented stuff out here...</description></item></channel></rss>