Friday, June 10, 2005

Using Fiddler for performance measurement

One of the comments on my Fiddler Performance article was

Using HTTP proxy for debugging sounds like 'destructive measurement': the measurement affects the results! IE sends different requests to proxies and to web servers directly.

This is partly true. One thing you might have noticed was that I didn't talk about using Fiddler to capture request timing: It's possible (via oSession["X-TTFB"] and oSession["X-TTLB"]) but it can be very misleading to measure this way. Why?

In Fiddler 0.9 and below, Fiddler never reuses sockets for anything, which may dramatically affect the performance of your site. Fiddler 0.9.9 (the latest beta) offers server-socket reuse, so the connection from Fiddler to the server is reused. Note that the socket between your browser and Fiddler is not reused, but since this is a socket->socket connection on the same machine, there's not a significant performance hit for abandoning this socket.

So, Fiddler isn't suitable for timing. But this doesn't impact your ability to check compression, conditional requests, Expires headers, bytes-transferred, etc. Other than the actual timings, the browser does not behave much differently with Fiddler than without (and chances are good that your visitors are using some type of proxy).
  1. The browser will often send Proxy-Connection: Keep-Alive; this isn't sent without a proxy.
  2. IE will send Pragma: no-cache if the user hits F5 or clicks the refresh button; without a proxy, you have to hit CTRL+F5 to send the No-Cache value.
  3. The fact that a client-socket is abandoned can lead to extra authentication roundtrips when using the NTLM connection-based authentication protocol.

I'll post any additional differences if I come across them, but in general, you should find that Fiddler is suitable for many types of performance investigations.


  • Hi! Wow! Thanks for documenting these findings! We've been pulling our hair out all afternoon using Fiddler looking at caching, only to realise it's corrupting our tests. We'll use Network Monitor now... :)

    By Anonymous Anonymous, at 9:54 PM  

  • Do your scenarios use the F5 key? Note that Fiddler isn't unique in this regard-- if any of your users have proxy servers, they'll see exactly the same behavior.

    By Blogger Ericlaw, at 12:00 AM  

Post a Comment

<< Home