Foundations/SystemPerformance/MeasuringPagePerformance

Not logged in - Log In / Register

Revision 6 as of 2010-03-04 14:37:21

Clear message

Measuring Page Performance

This page provides an overview of tools and techniques for measuring page load times in Launchpad.

The Ultimate Measure: Time To Interact

We evaluate our performance in terms of Time to Interact, or TTI. This value is the soonest that a person can use a Launchpad page.

TTI has three components: network time, spent on the wire; generative time, spent on the server; and render time, spent in the browser. This is the approach used by Facebook when they optimize their pages.

How Do I Measure Time To Interact?

Time To Interact can be roughly measured as the time from first byte of the first connection is sent to a site, until the time that the page's load event has fired, and all of the JavaScript page enhancements have been installed. Since most pages have minimal JavaScript, the load event works well as the end point of the measure.

The simplest way to measure TTI is to test the page in webpagetest.org using IE8 as the browser, or to use Firebug to measure the total page load time on your local system.

Keep in mind that there are a few key factors that have a major effect on Time To Interact for an individual user:

Measuring Network Time

Network time is any time spent waiting for the network connection to be negotiated so that a HTTP request is sent to the server. Network time often includes DNS lookups, the SSL handshake protocol, and time responding to 301 and 302 response codes.

Modern browsers allow up to six simultaneous connections per domain when loading a page. The time spent waiting for DNS and SSL negotiation on each of those connections may be time that could have been spent downloading resources or rendering the page. The first connection to a server always involves connection setup time, and thus always counts towards network time. Visual inspection of the Connection or Waterfall graphs is often needed to determine if the following five connections blocked the page load or not.

A special note on SSL negotiation: the first connection takes the longest to set up due to the handshake procedure. The SSL negotiation for the following five connections to the server happen much faster because the client already has some of server information it needs. In testing we observed that initial SSL handshake can take 750ms, but the following five handshakes only take 250ms.

Network time is the most difficult metric to improve because so many of the factors involved are not under our control.

Measuring Generation Time

Measuring Render Time

What Pages Should I Measure?

We have picked out a list of ten key pages that represent the most trafficed parts of Launchpad.

When measuring a page we prefer to take the "First View" numbers. The first view represents a new user hitting the page, and represents between 50% and 75% of the total page visits to Launchpad.net.

If there is a page that you feel is more appropriate than the ones on this list, then feel free to bring it up with the Foundations team.

Tools for Measuring Performance

PySlow

PySlow is a tool for automated collection and recording of YSlow test results. We have gathered the YSlow scores for the key launchpad pages together in one report:

webpagetest.org

Wireshark

zc.servertracelog

pingdom