views:

80

answers:

1

This is to collect from the experience that the community has done information on the aspect of Profiling web Application.

Some years ago I worked at a very large project in C++/Java with the a CORBA ORB and we were using Rational Purify/CodeCoverage to instrument, detect memory leaks and discover bottlenecks on server code. From that time I did not have any experience on using tools like that on the .NET platform either working on pure c# or with a web application

  • Do you use tools?
  • Do you estimate traffic and do calculations on the expected bandwidth needed?
  • Do you profile differently server code and web page rendering?

I know this is a very big topic. Some information I have are from the book "Performance Analysis for Java WebSites", who is fo the Java platform and reference tools for that platform but ises an approach that is transferable and so the core ideas apply generally.

+3  A: 

As a free load testing solution I have used Pylot. I am sure there are better paid solutions if you have a budget. If you can estimate traffic, this is the tool whose output you evaluate the scalabiltiy of your project against. Using the the asp.net output cache can improve your site performance under load significantly, so try this if your page views a second are less than you require.

For optimising your client side rendering speed use:

  • YSlow firefox plug-in
  • PageSpeed firefox plug-in by Google
  • Firebug firefox plug-in to check the number of HTTP requests are not excessive and js/css resources are being cached etc.

If developing a asp.net web forms app you can enable page tracing by modifying your page directive so it contains

<%@ Page Trace="true">

This will help you find controls which take longer to render.

If you have an issue with server side code being slow I have found it is almost always the database causing the issue. You need to check for SQL which is slow to return a result; if you find any you need to look at applying new indexes to your tables. If your app is too chatty with the database you need to look at reducing the number of calls to the database. To find these problems you can use SQL Server Profiler; this comes bundled with SQL Server 2005/2008 Developer edition.

If you have the budget, you definitely want to check of out Redgate ANTS Perforamcne Profile for profiling your server side code.

danielfishr
@danielfishr: thanks for your answer. I will give a look to these tools!
Lorenzo
+1 for ANTS, it's an excellent tool.
Steve Haigh