<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
    <title>Andy's Notebook</title>
    
    
    <link rel="alternate" type="text/html" href="http://www.andysnotebook.com/" />
    <id>tag:typepad.com,2003:weblog-1598290</id>
    <updated>2012-01-24T16:08:39+00:00</updated>
    <subtitle>The very occasional musings of a glue merchant...</subtitle>
    <generator uri="http://www.typepad.com/">TypePad</generator>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/AndysNotebook" /><feedburner:info uri="andysnotebook" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://hubbub.api.typepad.com/" /><entry>
        <title>Web Performance - A Whistlestop Tour</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndysNotebook/~3/NrSUd3JGd7I/web-performance-a-whistlestop-tour.html" />
        <link rel="replies" type="text/html" href="http://www.andysnotebook.com/2012/01/web-performance-a-whistlestop-tour.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-6a00e54f0e24bd88340163000b02c5970d</id>
        <published>2012-01-24T16:08:39+00:00</published>
        <updated>2012-01-24T16:08:14+00:00</updated>
        <summary>The slides from my recent talk at DigiTalks Cheltenham: Web Performance - A Whistlestop Tour View more presentations from Andy Davies</summary>
        <author>
            <name>Andy Davies</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-US" xml:base="http://www.andysnotebook.com/"><div xmlns="http://www.w3.org/1999/xhtml"><p>The slides from my recent talk at <a href="http://lanyrd.com/2012/digitalkschelt-january/" target="_self" title="DigiTalks Cheltenham">DigiTalks Cheltenham</a>:</p>
<div id="__ss_10995825" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a href="http://www.slideshare.net/AndyDavies/web-performance-a-whistlestop-tour-10995825" target="_blank" title="Web Performance - A Whistlestop Tour">Web Performance - A Whistlestop Tour</a></strong> <iframe frameborder="0" height="355" marginheight="0" marginwidth="0" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/10995825" width="425" />
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/AndyDavies" target="_blank">Andy Davies</a></div>
</div><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/AndysNotebook/~4/NrSUd3JGd7I" height="1" width="1" /></div></content>



    <feedburner:origLink>http://www.andysnotebook.com/2012/01/web-performance-a-whistlestop-tour.html</feedburner:origLink></entry>
    <entry>
        <title>Increasing the TCP Initial Congestion Window on Windows 2008 Server R2</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndysNotebook/~3/AqAoOseKPxU/increasing-the-tcp-initial-congestion-window-on-windows-2008-server-r2.html" />
        <link rel="replies" type="text/html" href="http://www.andysnotebook.com/2011/11/increasing-the-tcp-initial-congestion-window-on-windows-2008-server-r2.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-6a00e54f0e24bd88340162fcb329ad970d</id>
        <published>2011-11-21T21:27:15+00:00</published>
        <updated>2011-11-21T21:28:12+00:00</updated>
        <summary>In November 2010, Ben Strong highlighted how Google and Microsoft were cheating on TCP Slow-Start by setting the initial congestion window higher than the RFC value. Since then there's been quite a few articles discussing the performance benefits of increasing...</summary>
        <author>
            <name>Andy Davies</name>
        </author>
        
        <category scheme="http://sixapart.com/ns/types#tag" term="initcwnd" />
        <category scheme="http://sixapart.com/ns/types#tag" term="TCP" />
        <category scheme="http://sixapart.com/ns/types#tag" term="webperf" />
        <category scheme="http://sixapart.com/ns/types#tag" term="win2K8" />
        
<content type="html" xml:lang="en-US" xml:base="http://www.andysnotebook.com/">
&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;In November 2010, Ben Strong highlighted how &lt;a
href="http://blog.benstrong.com/2010/11/google-and-microsoft-cheat-on-slow.html"&gt;Google and
Microsoft were cheating on TCP Slow-Start&lt;/a&gt; by setting the initial congestion window higher than
the RFC value.&lt;/p&gt;

&lt;p&gt;Since then there's been quite a few articles discussing the performance benefits of increasing
the TCP initial congestion window (initcwnd). Most of the articles showed how to make the changes on
Linux but there was no coverage on whether and how it could be increased on a Windows Server.&lt;/p&gt;

&lt;p&gt;In one of their recent posts, &lt;a
href="http://www.cdnplanet.com/blog/tune-tcp-initcwnd-for-optimum- performance/"&gt;Tuning initcwnd for
optimum performance&lt;/a&gt;, the guys at CDN planet mentioned they didn't know how to change the
settings on Windows either.&lt;/p&gt;

&lt;p&gt;Having trawled through the various options in &lt;em&gt;netsh&lt;/em&gt;, I was coming to the conclusion it
wasn't possible but &lt;a href="https://twitter.com/#!/dritans"&gt;Drit Suljoti&lt;/a&gt; of Catchpoint pointed
me in the direction of MS Hotfix KB2472264  "You cannot customize some TCP configurations by using
the netsh command in Windows Server 2008 R2".&lt;/p&gt;

&lt;p&gt;After installing this hotfix I was able to change the initial congestion window to 10 (it can be
adjusted up to 16 * MSS).&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;b&gt;Installing and configuring&lt;/b&gt;&lt;/p&gt;

&lt;ol&gt;

&lt;li style="padding-top: 3px"&gt;&lt;p&gt;Request the Hotfix via &lt;a href="http://support.microsoft.com/kb/2472264"&gt;http://support.microsoft.com/kb/2472264&lt;/a&gt;&lt;/p&gt;

&lt;li style="padding-top: 3px"&gt;&lt;p&gt;Download and install the relevant version - it's available in x32, x64 and ia64 flavours&lt;/p&gt;

&lt;li style="padding-top: 3px"&gt;&lt;p&gt;Check the hotfix is installed ok&lt;br&gt;&lt;br&gt;

Type:

&lt;pre style="background-color: #EEE; display:block; padding: 5px;"&gt;
c:\netsh interface tcp show supplemental
&lt;/pre&gt;

and you should see:

&lt;pre style="background-color: #EEE; display:block; padding: 5px;"&gt;
The TCP global default template is internet

TCP Supplemental Parameters
----------------------------------------------
Minimum RTO (msec)                  : 300
Initial Congestion Window (MSS)     : 2
Delayed Ack Timeout (msec)          : 200
&lt;/pre&gt;

If you get the following then the hotfix hasn't been installed:

&lt;pre style="background-color: #EEE; display:block; padding: 5px"&gt;
The following command was not found: interface tcp show supplemental.
&lt;/pre&gt;&lt;/p&gt;

&lt;li style="padding-top: 3px"&gt;&lt;p&gt;Update the initial congestion window settings and switch to the custom template&lt;br&gt;&lt;br&gt;
First set the initial congestion window in the custom template:
&lt;pre style="background-color: #EEE; display:block; padding: 5px;"&gt;
c:\netsh interface tcp set supplemental template=custom icw=10
&lt;/pre&gt;

Then tell Windows to use the custom template instead of the standard internet one:

&lt;pre style="background-color: #EEE; display:block; padding: 5px;"&gt;
c:\netsh interface tcp set supplemental template=custom
&lt;/pre&gt;&lt;/p&gt;

&lt;li style="padding-top: 3px"&gt;Your server should now be running with the new initcwnd value, so pull out your favourite packet sniffer - Wireshark, tcpdump etc. and test.
&lt;/ol&gt;

&lt;p&gt;&lt;br&gt;&lt;b&gt;Performance&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;So far I've only tested this configuration on an EC2 instance and haven't deployed it in live production
environment yet.&lt;/p&gt;

&lt;p&gt;Cursory performance tests show a great improvement downloading the default welcome.png that comes
with IIS 7.5 - from 11.7s to 2.5s with a server in Singapore and a client in the UK.&lt;/p&gt;

&lt;p&gt;I'm not sure I quite believe the 11.7s time so over the next week I'll try some more tests with
various size files and post the results.&lt;/p&gt;

&lt;p&gt;Before (icw=2):
&lt;pre style="background-color: #EEE; display:block; padding: 5px;"&gt;
$ time curl ec2-175-41-175-250.ap-southeast-1.compute.amazonaws.com/welcome.png &gt; /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  180k  100  180k    0     0  15912      0  0:00:11  0:00:11 --:--:-- 20785

real	0m11.706s
user	0m0.008s
sys	0m0.015s
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;After (icw=10):
&lt;pre style="background-color: #EEE; display:block; padding: 5px;"&gt;
$ time curl ec2-175-41-175-250.ap-southeast-1.compute.amazonaws.com/welcome.png &gt; /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  180k  100  180k    0     0  75765      0  0:00:02  0:00:02 --:--:-- 93690

real	0m2.532s
user	0m0.007s
sys	0m0.015s
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;b&gt;Final Notes&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;If you're thinking of deploying the fix to a production server it's probably worth reading the
&lt;a href="http://datatracker.ietf.org/doc/draft-ietf-tcpm-initcwnd/"&gt; proposal submitted to the IETF
on increasing the default value to 10&lt;/a&gt; as it covers both the advantages and potential drawbacks
with an increased default.&lt;/p&gt;

&lt;p&gt;Jim Gettys also &lt;a href="http://tools.ietf.org/html/draft-gettys-iw10-considered-harmful-00"&gt;
points out some of the potential issues&lt;/a&gt; particularly in relation to the possible effects on 
network equipment.&lt;/p&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AndysNotebook/~4/AqAoOseKPxU" height="1" width="1"/&gt;</content>



    <feedburner:origLink>http://www.andysnotebook.com/2011/11/increasing-the-tcp-initial-congestion-window-on-windows-2008-server-r2.html</feedburner:origLink></entry>
    <entry>
        <title>Testing how slow third party components affect your page load times</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndysNotebook/~3/NW3mV5LzlUk/testing-third-party-components-affect-on-page-load-times.html" />
        <link rel="replies" type="text/html" href="http://www.andysnotebook.com/2010/10/testing-third-party-components-affect-on-page-load-times.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-6a00e54f0e24bd88340133f467c643970b</id>
        <published>2010-10-01T16:10:06+01:00</published>
        <updated>2010-10-01T16:10:06+01:00</updated>
        <summary>Third party widgets can slow your web pages down, learn how to test what happens to your webpages if the widget providers service slows down.</summary>
        <author>
            <name>Andy Davies</name>
        </author>
        
        <category scheme="http://sixapart.com/ns/types#tag" term="charles" />
        <category scheme="http://sixapart.com/ns/types#tag" term="web performance" />
        
<content type="xhtml" xml:lang="en-US" xml:base="http://www.andysnotebook.com/"><div xmlns="http://www.w3.org/1999/xhtml"><p>Both <a href="http://www.stevesouders.com/blog/2010/06/01/frontend-spof/" target="_self">Steve Souders</a> and <a href="http://www.webperformancetoday.com/2010/08/17/the-3-biggest-performance-problems-with-third-party-content/" target="_self">Joshua Bixby</a> have highlighted the effect slow third party components can have on  overall page load time.</p>
<p>Third party components have become common e.g. ads, links for bookmarking, sharing, widgets that pull in content from other sites etc, and the impact on our page load times depends on the quality of service they offer (both how the component is implemented and the reliability/speed of their service)</p>
<p>Steve and Joshua have highlighted approaches that can be used to decouple the components and reduce their impact on the performance of our pages but it's early days and only some providers have implemented them (<a href="http://www.sergeychernyshev.com/blog/slo-js-and-how-to-speed-up-widgets/" target="_self">Sergey Chernyshev</a> has a some thoughts too).</p>
<p>The challenge for web developers is understanding what the effect on page load times could be, when most of the time the providers' networks remain reliable.</p>
<p> </p>
<p><strong>Charles - a bandwidth limiting proxy</strong></p>
<p>To test the impact providers can have if they perform poorly we need to make the network connections to them unreliable and my tool of choice for this sort of situation is Charles (<a href="http://www.charlesproxy.com/">http://www.charlesproxy.com/</a>)</p>
<p>Charles allows both low bandwidth and high latency to be simulated, either on an all sites or individual site basis.</p>
<p>To enable throttling choose <span style="text-decoration: underline;">P</span>roxy -&gt; <span style="text-decoration: underline;">T</span>hrottle Settings and check the first box, the same dialog also enables configuration of bandwidth and latency constraints, and the URLs they apply to</p>
<p>On the sites I tested, I throttled using high latency for each provider individually - as an example here's one for addthis.com with the latency set to ten seconds.</p>
<p><a href="http://andysnotebook.typepad.com/.a/6a00e54f0e24bd88340133f4c5965a970b-pi" style="display: inline;"><img alt="ThrottleSettings" border="0" class="asset  asset-image at-xid-6a00e54f0e24bd88340133f4c5965a970b" src="http://andysnotebook.typepad.com/.a/6a00e54f0e24bd88340133f4c5965a970b-800wi" title="ThrottleSettings" /></a> <br /><br /></p>
<p>I also used the normal waterfall tools (Firebug and WebKit inspector) to see when onload was being fired at, so I could experiment with asynchronous loading to mitigate the effect of the latency.</p>
<p> </p>
<p><strong>Look out for subtle failures!</strong></p>
<p>One webapp I tested used the widgets from addthis.com and even with long latencies set, the pages appeared to load quickly, but further testing found the tour was broken - clicking the button just replaced the current page with an image</p>
<p>The tour used lightbox to display a series of images, the delay in downloading the javascript from addthis prevented the onload event from being fired and so the lightbox code wasn't being inserted into the page.<br /><br />Charles works on Windows, Mac and Linux, and has a free trial, so give it a try. Find the components that cause problems for you and raise the issue with their providers.</p>
<p> </p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/AndysNotebook/~4/NW3mV5LzlUk" height="1" width="1" /></div></content>



    <feedburner:origLink>http://www.andysnotebook.com/2010/10/testing-third-party-components-affect-on-page-load-times.html</feedburner:origLink></entry>
    <entry>
        <title>The Need For Speed... why slow page load times matter</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndysNotebook/~3/ZEXgHeDbOak/the-need-for-speed.html" />
        <link rel="replies" type="text/html" href="http://www.andysnotebook.com/2010/09/the-need-for-speed.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-6a00e54f0e24bd88340133f467c37c970b</id>
        <published>2010-09-20T21:43:47+01:00</published>
        <updated>2010-09-20T21:43:47+01:00</updated>
        <summary>About a week ago, I did a presentation at BarCamp Stroud on why page load times matter and things that can be done to improve them. It was fun to present and share what I'd learnt on a topic I'd...</summary>
        <author>
            <name>Andy Davies</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-US" xml:base="http://www.andysnotebook.com/"><div xmlns="http://www.w3.org/1999/xhtml"><div style="width: 425px;">About a week ago, I did a presentation at <a href="http://www.barcampstroud.co.uk/" target="_self" title="BarCamp Stroud">BarCamp Stroud</a> on why page load times matter and things that can be done to improve them.</div>
<div style="width: 425px;">It was fun to present and share what I'd learnt on a topic I'd spent a lot of time investigating and implementing for a WebApp I run (got quite a few things still left to do)<br /><br />Here's the presentation for anyone who's interested, and there will probably more as I've already made some notes on other things to cover. </div>
<div style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a href="http://www.slideshare.net/AndyDavies/the-need-for-speed-5191931" title="The Need For Speed">The Need For Speed</a></strong> 
<object height="355" id="__sse5191931" width="425">
<param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=theneedforspeed-100913122220-phpapp02&amp;stripped_title=the-need-for-speed-5191931&amp;userName=AndyDavies" />
<param name="allowFullScreen" value="true" />
<param name="allowScriptAccess" value="always" /><embed allowfullscreen="true" allowscriptaccess="always" height="355" name="__sse5191931" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=theneedforspeed-100913122220-phpapp02&amp;stripped_title=the-need-for-speed-5191931&amp;userName=AndyDavies" type="application/x-shockwave-flash" width="425" />
</object>
</div>
<div id="__ss_5191931" style="width: 425px;">
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/AndyDavies">Andy Davies</a>.</div>
</div>
<script src="http://b.scorecardresearch.com/beacon.js?c1=7&amp;c2=7400849&amp;c3=1&amp;c4=&amp;c5=&amp;c6=" />
<script src="http://b.scorecardresearch.com/beacon.js?c1=7&amp;c2=7400849&amp;c3=1&amp;c4=&amp;c5=&amp;c6=" /><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/AndysNotebook/~4/ZEXgHeDbOak" height="1" width="1" /></div></content>



    <feedburner:origLink>http://www.andysnotebook.com/2010/09/the-need-for-speed.html</feedburner:origLink></entry>
    <entry>
        <title>.net and ISA Server - reducing bandwidth consumption</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndysNotebook/~3/gYrEXc3gCdo/net-and-isa-server-reducing-bandwidth-consumption.html" />
        <link rel="replies" type="text/html" href="http://www.andysnotebook.com/2010/07/net-and-isa-server-reducing-bandwidth-consumption.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-6a00e54f0e24bd8834013485859a75970c</id>
        <published>2010-07-18T22:45:45+01:00</published>
        <updated>2010-07-18T22:51:20+01:00</updated>
        <summary>Improve .net page load times by serving out static versions of ScriptResources</summary>
        <author>
            <name>Andy Davies</name>
        </author>
        
        <category scheme="http://sixapart.com/ns/types#tag" term=".net" />
        <category scheme="http://sixapart.com/ns/types#tag" term="bandwidth" />
        <category scheme="http://sixapart.com/ns/types#tag" term="caching" />
        <category scheme="http://sixapart.com/ns/types#tag" term="ISA Server" />
        <category scheme="http://sixapart.com/ns/types#tag" term="performance" />
        
<content type="xhtml" xml:lang="en-US" xml:base="http://www.andysnotebook.com/"><div xmlns="http://www.w3.org/1999/xhtml"><p>Earlier this year I came across some problems with some .net resources not being cached by ISA Server (<a href="http://www.andysnotebook.com/2010/01/the-joys-of-net-and-isa-server.html">.net and ISA Server - a match made in hell?</a>)</p>

<p>The problem in a nutshell is that by default ISA Server doesn't cache URLs that have query parameters, and the method .net uses to serve static resources that are bundled in .dlls relies on query parameters.</p>

<p>When .net uses the Microsoft AJAX framework, script elements like the one below are inserted into the page </p>

<p><span class="code-quote"><span style="font-family: Courier;">&lt;script src="ScriptResource.axd?d=ki7GLYn2P5z-CEtE0SsvKYJhnTEkD13edwjg24cmxWe4aD03WzKyGXQD45nYCFy70&amp;t=633178683580000000"</span></span><span style="font-family: Courier;"> type=</span><span class="code-quote"><span style="font-family: Courier;">"text/javascript"</span></span><span style="font-family: Courier;">&gt;&lt;/script&gt;</span></p>

<p><span style="font-family: Arial; ">After looking at some of the lastest developments in .net 4.0 I discovered that ScriptManager could be used to serve out static versions of the AJAX framework (even in versions of .net before 4.0).<br /><span><br /><span>After a few attempts I came up with this code that takes the ScriptResource.axd references in the page and replaces them with static scripts instead, which are of course generally cachable by ISA Server</span></span></span></p>

<p />

<p />

<p><span style="font-family: Courier;">&lt;asp:ScriptManager ID="Script" runat="server" EnablePartialRendering="true"&gt;</span><br />

<span style="font-family: Courier;">    &lt;Scripts&gt;</span><br />

<span style="font-family: Courier;">        &lt;asp:ScriptReference Name="MicrosoftAjax.js" Assembly="System.Web.Extensions" Path="~/js/ms/MicrosoftAjax.js" /&gt;</span><br />

<span style="font-family: Courier;">        &lt;asp:ScriptReference Name="MicrosoftAjaxWebForms.js" Assembly="System.Web.Extensions" Path="~/js/ms/MicrosoftAjaxWebForms.js" /&gt;</span><br />

<span style="font-family: Courier;">     &lt;scripts&gt;<br />

<span style="font-family: Courier;"> &lt;asp:scriptmanager&gt;</span></span></p>

(the release i.e. minified, versions of the scripts within the MS AJAX framework have been placed in /js/ms)<p>By default the scripts won't be served gzipped, or with the long expiry times that ScriptResource normally serves them with but this can be addresses by configuring IIS (which is how it should be in my view)<br /><span><br /><span>We're still measuring how much this improves our page load times and how much it reduces our bandwidth consumption but it looks to make a significant difference.<br /><span><br /><span>If you're interested Dave Reed has written more on what's possible with ScriptManager in .net 4.0 -  </span></span></span></span><a href="http://weblogs.asp.net/infinitiesloop/archive/2009/11/23/asp-net-4-0-scriptmanager-improvements.aspx">ASP.NET 4.0 ScriptManager Improvements</a> </p>

<p>

</p>

<p />

<p />

<p />

<p><span style="font-family: Courier;"><br /></span></p>

<p /><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/AndysNotebook/~4/gYrEXc3gCdo" height="1" width="1" /></div></content>



    <feedburner:origLink>http://www.andysnotebook.com/2010/07/net-and-isa-server-reducing-bandwidth-consumption.html</feedburner:origLink></entry>
 
</feed><!-- ph=1 -->

