Topics


Blogs


Forums


Samples


Media


Labs


Resources

 




DevCentral > Weblogs > Dawn Parzych - Dawn's Blog
  Friday, June 19, 2009 #
  
My Site Is Faster Than Your Site

Earlier this week the Fast Web Race announced that the rules for the contest have changed slightly.  There are now two categories – one for sites looking for improvement and one for sites that want to brag about how they’ve achieved performance improvements.  The rules of category one haven’t changed so if you’re looking for some free advice on how to improve your web sites performance sign up now. 

For those looking to brag about all the hard work that was devoted to improving their web applications here’s what you have to do.

  1. Download the KITE software and record a transaction through your application.
  2. Describe all the hard work, techniques, or acceleration solutions you used to achieve these goals.  Don’t forget to talk about what the performance was like before implementing these improvements.  
  3. Submit your entry.

The deadline for submitting to both contests is July 15th.  What are you waiting for? 


Add Comment |
 
      

  Wednesday, June 10, 2009 #
  
Caching and Firefox 3.5 Preview

Recently I wrote about Firefox using the Expires header as opposed to the max-age Cache-Control header.  It was pointed out that the bug tracking this is marked as closed.  I was very excited by this news and when I saw the news yesterday that Firefox had released a preview of 3.5 I decided to check and see if this bug fix had made it into 3.5.  Needless to say I was very disappointed to still see that the incorrect caching behavior exists - the Expires header overrides the Cache-Control header. 

I did a little bit of digging around and see that this bug was first reported April 24, 2003 that's 6 years and still no fix in site.   My question is why is it taking so long for this issue to be resolved?  The targeted milestone for this to be fixed is mozilla 1.9.2a1.  No where have I been able to find what Firefox version that correlates to.  The Firefox 3.5 Preview is using 1.9.1b99.  When oh when will this be fixed? 

clip_image002On the plus side I really like the changes in the Clear Recent History functionality.  I am constantly having to clear my cache when testing sites to see how they perform with and without a populated cache.  Of course this means wiping out my entire cache and the result is I get slower performing page downloads for the sites I frequently visit.  The ability to specify a time range is a definite step in the right direction so I can only clear the content for the last hour and not items that have been in cache longer.   I'm still looking for a way to clear only the memory cache.

 


3 Comments |
 
      

  Monday, June 08, 2009 #
  
Page Speed v1.0 VS YSlow v2.0

Last week Google announced a new open source plug-in for Firefox called Page Speed which can be used to assess the performance of web pages and make recommendations on speeding up the delivery.  To me this sounded a lot like Yslow, of course that plug-in was developed and maintained by Yahoo! so it does make sense that Google would want to come up with their own version.  As I hadn't yet upgraded to YSlow 2.0 I figured this was a good time to see what the new version had to offer and how Page Speed compares. All testing was conducted on the DevCentral home page with a unpopulated cache.

The first problem I encountered with both is that I currently am using Firefox 3.5 beta and Firebug 1.4 neither of the two add-ons currently provide support for these beta releases.  This meant reverting back to Firefox 3.0 and Firebug 1.3.3.  The next incompatibility I found was with Page Speed and HttpWatch.  These two add-ons are considered incompatible when it comes to the Page Speed Activity tab. 

 

imageThe warning message is rather vague and not to be deterred I went ahead and tested what would happen if I imageran the two together.   I was able to run both the Page Speed Activity report and HttpWatch at the same however the resulting graphs from Page Speed were illegible.  The two add-ons when run at the same time provided different response time results Page Speed said the page took 16 seconds while HttpWatch showed only 14.4 seconds.

YSlow on the other hand does not present any incompatibility warning message and the response time results are quite similar 12. 735 seconds for HttpWatch and 12.744 seconds for YSlow.  

 

 

On of the nicest new features of YSlow 2.0 is the ability to customize the rules that are applied.  There are 3 default rulesets YSlow (v2), Classic, and Small Site or Blog.  The Classic ruleset provides 13 rules while version 2 has added 9 additional rules.  I'm a little confused by the Small Site or Blog option as some of the rules that have been de-selected like using an expires header should apply to any site.  Any  of the default rule sets can be customized to add or remove a rule, for example with DevCentral we get an F for use a eContent Delivery Network (CDN) because YSlow doesn't pick up the fact that we have built our own mini-CDN with acceleration solutions from F5 Networks

Now onto some of the recommendations that are provided. 

Browser Caching

For repeat visitors the use of Cache-Control or Expires headers are very useful.  Where YSlow  and Page Speed differ is in the recommendation for how long the content should be cached for.  YSlow recommends 2 days while Page Speed suggests 30 days, I have to say I agree with YSlow on this point.  If there is no way for a browser to recognize if the content that has been cached has changed then a static 30 days expiration may be result in stale content being served to end users.  To use an expiration like 30 days the development process has to change as well to include some sort of versioning to prevent the browser for serving stale content.  Changing the development process isn't always possible which is why a shorter expiration may be needed.  One of the down-sides to YSlow is that they use a default value of 48 hours for the cache if objects are cached for less than this time points are deducted and a low score is provided.   Even though DevCentral uses an expiry between 2 days and 180 days 27 objects are flagged by YSlow as not having a far-future expires.  The items that are flagged are those having a 2 day expiry cache-control headers are set to public, s-maxage=14400, max-age=172800, I believe what is happening here is that between the item being cached and YSlow running the analysis just enough milliseconds have passed to have the content be just under 2 days and therefore trigger the warning. It would be nice if you could configure what was an appropriate expires for your business and have the tools use that value instead of having a value imposed on you. 

Compression

Using GZIP is a great optimisation technique and should be used whenever possible.  While there are about 20 text files on the DevCentral homepage there are 2 that are not compressed which is picked up and flagged by both tools.  It is unfortunately not always possible to compress every single text file.  I have spent hours with customers trying to debug why an application doesn't work when compression is enabled, in the end it turns out to be a single script file that when compressed causes the page functionality to break, disabling compression for the script in question resolves the problem.  If there are multiple compressed files on a page and only 1 or 2 that aren't compressed there may be a reason for it.

Reduce DNS Lookups

Page Speed and YSlow both recommend reducing the number of DNS lookups and have identified the domains the content is coming from.  YSlow provides a score of A even though there are 5 domains.  Page Speed suggests eliminating some of these items - unfortunately that can't be done as these are third party resources that are used for various analysis and tracking - one of which just happens to be from Google.  It seems like YSlow is a little smarter in identifying what these are for and that they can't be reduced.  This  recommendation is actually a little puzzling to me as one way to speed up page download is to spread the requests across multiple domains to allow more items to download in parallel.  Page Speed provides this as a recommendation as well but doesn't this contradict the recommendation to reduce DNS lookups.

 

Generally speaking both tools are valuable in understanding where a site may be slow and where improvements can be made but make sure to investigate whether or not the recommendations work for your application.  There may be reasons why things are the way they are.  It will be interesting to see how these continue to evolve. 


Add Comment |
 
      

  Thursday, June 04, 2009 #
  
Bing Vs Google - A Performance Perspective

Being the total acceleration junkie that I am the first time a new site is launched or recommended to me the first thing I do is take a look at the performance of it.  So when I heard about Bing the first thing I did was fire up HttpWatch and take a look at the site.  To make things a little more interesting I decided to compare the results to Google, I used the classic home page and not my customized iGoogle home page.

Tests were conducted from my home broadband connection in London, England.  Each test was done with a fresh instance of the browser and with an empty browser cache.  I did access the sites multiple times to make sure that there were no anomalies (which there weren't)  below are the results from one test run.  What was I searching for - ME!

  Bing Google
Number of Objects 11 11
Total Home Page Size 114K 52K
Total Download Time for Home Page 3.2 seconds .867 seconds
Search Results 1.55 .666
Number of Search Results 6440 2700

Looking into the statistics a little further I was curious why with the same number of objects on the page the Bing site was twice as heavy as Google.  Turns out the culprit is the background photo, in the test runs I conducted the background image was 74K.  Being a photography buff I think the photo was excellent but for almost 65% of the total download size to be attributed to a single background image is a bit much for a search engine.  

Both sites try to predict what you are searching for and provide suggestions, in both instances these requests were miniscule and the response times ranged from .04 -.08 for both sites.

Bing and Google both realized that I was in the UK and offered to allow me to search for results only in the UK or the entire web.  I chose the entire web for both.  Being in the UK Google does redirect me from www.google.com to www.google.co.uk.  The 302 redirection took .157 seconds    

I'm not sure why Bing returned over twice as many search results for my name, I didn't have the time to go through all the entries.  I also hadn't realized I was that popular on the web.


5 Comments |
 
      

  Wednesday, June 03, 2009 #
  
Calling All Slow Web Sites

fastwebrace-logoLast week I wrote a post on the Fast Web Race, following on from that post I was contacted by the event program manager and have been asked to be a judge.   I was looking forward to this contest before now I'm even more excited about it.  I'm joining an elite team of judges and experts in the field of application acceleration and web performance.  The judges include:

With this panel of judges I am sure I'll be able to learn from them as well. 

Entrants are being accepted until the end of the month and all details on how to enter can be found at the Fast Web Race website. Having spent the last few years working in Europe I hope there will be at least a few European entries.

 


Add Comment |
 
      

  Friday, May 29, 2009 #
  
Catch the Google Wave

Yesterday Google announced a new HTML 5 based tool for web based communication and collaboration called Wave.  One of the coolest things about Wave is this is an open-source project, anybody can embed waves in their site and build extensions using the Google Wave API.  The protocol called the Google Wave Federation Protocol  is based on XMPP (Extensible Messaging and Presence Protocol).

Reading the documentation on the protocol I immediately started to think about what impact these waves will have in environments with Application Delivery Controllers:

  • What load balancing method is best?
  • What about persistence?
  • Can the content be compressed?
  • Are the waves cacheable?
  • Can the encryption be off-loaded from the servers to an application delivery controller?

I'll be interested to see how sites start to build waves.

Technorati Tags: ,,

One Comment |
 
      

  Friday, May 22, 2009 #
  
Fast Web Race Contest

This week Keynote Systems announced a Fast Web Race contest.  According to the site the purpose of the contest is to improve the overall performance of many web sites by sharing best practices and real world examples. 

"Everyday we work with Web dev and ops communities and we see a lot of the same performance issues come up. We think there’s an opportunity to share best practices with the community using real world examples."

There's nothing better than sharing what you've learned with a community, isn't that what DevCentral is all about.  I am looking forward to seeing the results from this contest and welcome any additional sharing and collaboration in the field of web application performance.


Add Comment |
 
      

  Friday, May 15, 2009 #
  
Google Chrome Extension I Want to See

This week Google announced that Chrome is now going to support extensions and plug-ins.  Early design documents and reference materials have been released and I'm looking forward to seeing what gets developed.  I downloaded and installed Chrome shortly after it was released as I was interested in the performance enhancements available.  I hate to admit that unfortunately I haven't used Chrome much primarily due to the lack of extensions - specifically one extension.

The extension that I use more than any other is HttpWatch.  Being able to view all the headers and cache settings is invaluable when troubleshooting and analysing a web applications performance.  Without the ability  to access this information in Chrome I continue to use IE and Firefox as my primary browsers and haven't used Chrome in months.  Once I can get a plugi-n that provides this information in Chrome I may be able to start using it more frequently.  If I was a developer I would write the extension myself but instead I eagerly await the notification that this much needed extension is available. 

 

Technorati Tags: ,,
,

Add Comment |
 
      

  Thursday, May 14, 2009 #
  
v10 WebAccelerator and iRules

A customer recently contacted me regarding an iRule that worked in v 9.4 but did not produce the expected results in v 10.  A little research revealed that the new plug-in architecture is influencing when the iRule is firing.

The iRule

The iRule is logging the value of the X-PvInfo header or indicating the header is not present. 

when HTTP_RESPONSE {
  if {[HTTP::header exists X-PvInfo]}{
   log local0. "X-PvInfo:[HTTP::header "X-PvInfo"]"
  } else {
   log local0. "did not find X-PvInfo header"
  }
}

The Problem

WebAccelerator inserts the X-PvInfo header into each and every response that it processes, there should be no instances where the header is missing however in v10 the Local Traffic logs on the Big-IP show "Rule LogHeaders <HTTP_RESPONSE>: did not find X-PvInfo header."  Looking at the headers received by the browser I can clearly see that the header does exist. 

(Status-Line)      HTTP/1.1 200 OK
Accept-Ranges  none
Authorization    123
Cache-Control   must-revalidate, no-cache, no-store, post-check=0, pre-check=0
Connection         Keep-Alive
Content-Encoding           gzip
Content-Length                1256
Content-Type    text/html; charset=UTF-8
Date      Fri, 01 May 2009 12:25:16 GMT
ETag       "pvfe8a15580ad513c1f56c687ef64d6bab"
Vary       Accept-Encoding
X-PvInfo              [S10202.C5877.A15567.RA0.G0.UB5831B78].[OT/html.OG/pages]

The Issue

With the new plug-in architecture the HTTP_RESPONSE event is triggered after the response from the server before the plug-in and WebAccelerator processes the response.  The response from the server does not contain the X-PvInfo header that is inserted after WebAccelerator has processed the server response.   Prior to the plug-in architecture the HTTP_RESPONSE event fired after WebAccelerator processed the response from the server.  The difference in when the iRule fires results in the log message that the header doesn't exist.  

The Solution

To have an HTTP_RESPONSE event fire after WebAccelerator has processed and manipulated the response you need to define a custom virtual server configuration known as VIP targeting VIP.   VIP-to-VIP configures a front virtual server which contains the WebAccelerator post-processing iRule and the back virtual server has the WebAccelerator enabled class associated with it.  Solution 9388 on AskF5 illustrates how to do this using ASM.  The same applies to WebAccelerator. 

The trick with VIP targeting VIP is the front server does not have a pool assigned to it the pool is selected from within the iRule.  Our iRule above would need to be changed to:

when RULE_INIT {
# Define a global variable which references the WA-enabled VIP name
  set ::targetvip "back_vip"
}
when HTTP_REQUEST {
  virtual $::targetvip
}

when HTTP_RESPONSE {
  if {[HTTP::header exists X-PvInfo]}{
   log local0. "X-PvInfo:[HTTP::header "X-PvInfo"]"
  } else {
   log local0. "did not find X-PvInfo header"
  }
}

The front virtual server should have a configuration that looks something like:

virtual front_vip {
   snat automap
   destination 172.16.1.100:http
   ip protocol tcp
   rules post_wa_irule
   profiles
      http
      tcp
}

The back virtual server should have a configuration that looks something like:

virtual back_vip {
   snat automap
   pool testpool
   destination 172.16.1.101:http
   ip protocol tcp
   httpclass WebAccelerator
   profiles
      http-acceleration
      tcp
}


Add Comment |
 
      

  Monday, April 20, 2009 #
  
Faster Loading Blogs

I maintain a personal blog on Blogger and was pleased to recently see an article on how to make my blog load faster.  Being an acceleration junkie I was very interested in what was recommended given that many of the items that typically influence the load time of a page are server side configurations which I have no control over with a hosted service like Blogger.  

Some of Blogger's recommendations:

  1. Limit the number of posts displayed per page to 10 or less. 
  2. Reduce the size of images.
  3. Post images to a web album and post the link instead of all the images. 
  4. Put third party JavaScript at the bottom of the page. 

All very good recommendations but nothing I can do to speed up my page.

  1. I only display 7 posts per page.
  2. The images I upload usually are less than 20K (sometimes a few larger ones sneak through).
  3. I do utilize web albums - I have my own site and use Flickr (surprisingly not the service Blogger recommends). 
  4. The only third party JavaScript I use is for analytics and that is on the bottom of the page. 

I decided to check out what Blogger was doing on its side to speed up the delivery of my blog and I was a little surprised by some of my findings.  

Image Size

As Blogger recommend small image sizes I took a look at all the images on the home page.   As many of the images are part of the framework of the page.  The largest image isn't even one of mine, it's a 39K header image.  Nothing I can do to reduce the size of this except change the template being used. 

Cache-Control Headers

One of the best things to improve the load time of a page for repeat visitors is to set far futures expire headers.  Of the 38 objects on my home page 16 objects have an expiry of 1 year or greater (excellent), 3 are set for 1 week (good) and 15 are set to 24 hours (not so good) and the rest expire immediately or close to it.   The 15 images that only have a 24 hour expiry are images I have personally uploaded.  The items that are part of the framework benefit from a long expiry but my personal items don't.

   This means that repeat visitors to my blog need to execute a conditional GET request for these objects each and every time.  I'm curious why these don't get the same long expires as the framework does?  Once I upload a picture I don't change it and even if I do it appears that the naming convention used by Blogger would result in a different name when re-uploaded.  

Multiple Domains

The majority of the browsers on the market today limit the number of open connections that can be established to an individual server.  This restriction is determined by the domain name, different domains are considered to be different servers.  Using multiple domain names allows for content like images to be downloaded in parallel speeding up the delivery of the page especially over high latency links.   The folks over at Blogger realized this and use many different domains for the content but it looks like they went a bit overboard.  There are 8 different domains being used to load the 38 objects on the page, this means 16 TCP connections.  Is this really speeding up the page or does this many TCP connections slow things down?

Technorati Tags: ,,

Add Comment |