How to read the AOL PageTest waterfall chart
AOL PageTest is a great tool for testing the real-world performance of your website. Key to understanding of the test results is the waterfall diagram. Here's a test that was run from the US on the New Zealand Immigration website www.immigration.govt.nz - this site is the NZ government's face to the world for people looking to live and work in New Zealand so should be fast for international users:
AOL PageTest waterfall chart for www.immigration.govt.nz (click to enlarge):
The legend at the top of the chart describes the different stages that each HTTP request passes through:
1. DNS lookup must occur for each unique domain name used to make up a page, and since this can take 200-500ms it's best to limit the total number of domains used to serve content to no more than four. In this example there is only 1 DNS lookup as everything from this site is served from the same domain.
2. Initial connection is the establishment of the underlying TCP socket connection from the browser to the web server. Different browsers use varying numbers of ports to download resources simultaneously - more ports equals more parallelism, but also more TCP connection overhead time. The recommended limit is around 6 connections which is what recent browsers use. This example shows only 2 requests with TCP connection overhead, since IE7, which was used for the test, only uses 2 TCP ports per domain.
3. Time to first byte is the time the browser spent waiting for the server to start streaming data. This includes any render time on the server, but typically consists of pure "network time". This is the time it takes for the messages your browser sends to the web server to be received and the response to come back over the wire. This is often referred to as latency, and is the killer of speed for most websites. This website shows an average of around 420ms of latency, for a total of about 7 seconds of wait time for users.
4. Content download is the length of time it takes for the actual payload of a resource to arrive in full. On broadband, the blue time is almost always negligible - the example here is atypical in that it shows a lot of blue, which may indicate that the server is rate limited to only serve content at a particular speed.
5. Start Render is the green line that runs top to bottom through the waterfall chart, and indicates the time at which a visitor to the site first receives some visual indication that the site is loading. In this example the user has had to wait at a white screen for around 15 seconds before any content starts to appear on the page. This metric greatly affects the perceived speed of a site, since once the page starts rendering users are more willing to wait.
6. Document complete is the point at which all resources have completely downloaded, all scripts have run and the page is fully ready for user interaction. Until this occurs, the user will see a progress bar, spinning icon or other such indicator that the page is not yet complete. In the example, this has taken 30 seconds before the page is fully loaded and ready to go - too long for many users to wait.
Presenting the various component requests that make up a full page as a waterfall is useful in that it shows the behavior of the browser as it loads the page. The example here shows a typical cascade of requests over time, with CSS StyleSheets being loaded sequentially first, followed by a number of images in parallel. If this page had contained any JavaScript files, they would have also been loaded sequentially after the CSS.
Key to making your website go faster is establishing what is making it slow. If the PageTest waterfall chart shows a lot of green then you have a latency problem (i.e. too much network time) while if it contains mostly blue then you have a bandwidth problem.
The RPO is a software only component that speeds up page load time by shrinking network time and content download time automatically, typically making your pages load 33% - 75% faster.
http://www.webpagetest.org - United States hosted AOL PageTest site.
http://www.webpagetest.org.nz - New Zealand hosted AOL PageTest site.