VTune Enterprise Analyzer for Web Applications

Uncover the weak link(s) in your distributed three-tier ASP.NET applications.

Ken McNamee

October 30, 2009

11 Min Read
ITPro Today logo

asp:review

LANGUAGES: All .NET Languages

TECHNOLOGIES: COM+ | Web Services

 

VTune Enterprise Analyzer for Web Applications

Uncover the weak link(s) in your distributed three-tierASP.NET applications.

 

By Ken McNamee

 

For most of you, optimizing your ASP.NET applications forperformance is an absolute must. But optimizing a three-tier ASP.NETapplication that involves code distributed on multiple servers via T-SQL storedprocedures, Web Services, COM Interop and/or .NET Remoting is an absolute pain.Intel's VTune Enterprise Analyzer for Web Applications can relieve most of thatpain by helping you quickly identify the areas of your application that need tobe tweaked a little or even completely overhauled.

 

Let me start by saying that VTune is a very high-endperformance analyzer. It's called "Enterprise Analyzer" for a reason, and itreally works best when analyzing each tier of the classic three-tier Webapplication architecture - the Web tier, application or business object tier,and database tier - on its own physical server. If you have only a two-tier Webapplication, you still will get some useful information from VTune but it mightnot be worth the price of admission.

 

The application architecture I used to test VTune is amodified version of Microsoft's Downhill Bikes sample Web application. Itinvolves four servers: the main ASP.NET Web server, a SQL Server, an ASP.NETWeb Services server, and a machine that contains two COM DLLs accessed via aCOM+ proxy. This is a minimal enterprise-style architecture whose only intentis to demonstrate how VTune can watch multiple servers under load, determinewhich pieces of the application are being executed at any given time, andaggregate the performance data of those pieces. In case you're wondering, theimpact on the system while VTune is collecting data is insignificant.

 

VTune Enterprise Analyzer is actually composed of twodistinct pieces: A server application collects data from all the servers it'swatching, and a GUI application allows you to start and stop the datacollection and view the results. Installing VTune is fairly straightforward andI encountered no surprises. One caveat, however, is that the collection serverand Web servers must all be located on the same network hub. So, analyzingmultiple Web farms simultaneously from a single collection server at this timeis not possible.

 

In addition to the network topography, each machine thecollection server watches must have a special Windows account created to enableaccess. This account must be a member of the Administrators group. You alsohave the option of using a domain account with sufficient permissions for thecollection server to do its job.

 

The first step in using VTune to analyze yourapplication's performance actually has nothing to do with the product. Firstyou should simulate heavy load on your servers using a load-testing tool suchas Mercury Interactive's LoadRunner or the Application Center tool includedwith the Enterprise Architect and Enterprise Developer editions of Visual Studio.NET. A free alternative to these tools is Microsoft's Web Application StressTool, which is a little less polished but still works well.

 

The Tier View

Once you've created your load-testing script, you're readyto fire up VTune. Start by creating a new project and configuring thecollection server to watch all the servers that comprise your application (seeFigure 1).

 


Figure 1. Telling VTune which tiers to watch is as easy as giving it thenames of the servers and clicking on a few checkboxes.

 

At this point, you want to start your load tester tosimulate a production system, then start the collection process from VTune'sGUI application. You can run this for as long as you like, then simply stop thecollection server.

 

You can view the results of the test in several ways: bytier, by machine, by object, or by task. As displayed in Figure 2, the TierView shows a graph of the entire test and the response time for each tier ofthe application. This gives you a good, high-level overview of how each tier performedduring the lifetime of the test and allows you to identify areas that mightneed further inspection.

 


Figure 2. VTune's Tier View gives you a high-level overview of theperformance of the application tiers.

 

The graph also is one part of VTune that falls short ofbeing intuitive; the GUI application has almost no context menus. For instance,using the left mouse button, you can click and drag to highlight a time sliceof the graph. Once highlighted, I expected I could right-click and a menu wouldpop up, showing me what options were available. This didn't happen, and I hadto search through the help files to discover that I had to click on a toolbarbutton named Time Filter to zoom in on thehighlighted area. Additionally, although the Tier View is useful, I foundmyself wishing I could get a little more information out of it, such as seeingwhat calls were being made as my cursor hovered over the graph or highlightedan area.

 

Machine, Task, and Object Views

Machine View (see Figure 3) allows you to drill down alittle deeper than the aggregated tiers of the application. As its nameimplies, the Machine View lets you see how each physical server is performingand responding under the load. You can filter out tiers or view them all atonce, and you can select which server attributes to include in the graph, suchas CPU usage, physical and virtual memory usage, disk I/O, network bandwidthusage, and response time.

 


Figure 3. The Machine View shows the performance of each server involvedin the test.

 

There is some good information to be found here. Iactually prefer to start in this view after running the test because it seemsto give me the right balance of high-level overview and low-level detail so Ican start pinpointing the problem areas quickly. However, this view is alsoplagued by the same non-intuitiveness as the Tier View - though, like mostidiosyncratic software, it doesn't bother you once you get used to it.

 

As useful as the Tier and Machine views are, the next twoviews are really where VTune shines and where ASP.NET developers are going toget the most value for their time, money, and effort. Starting with the TaskView (see Figure 4), VTune begins to display information that will beimmediately familiar to any developer: URL requests, method calls, and databasecalls. These types of calls map directly to the physical tiers of thethree-tier application architecture.

 


Figure 4. Detailed performance information about ASP.NET requests andSQL and method calls is displayed in the Task View.

 

The Task View gives the minimum, average, and maximumresponse times for all the requests and calls being executed. In addition, itcalculates the load of each call, which is the average response time multipliedby the number of times the call was executed. A high load number could mean theitem being executed might not be fully optimized and requires some attention.

 

Clicking on one of the executed items displays a graphoutlining the performance of the item over the course of the test. As with theother views, you can highlight a time slice and zoom in for a better look. Youeither can view the detail for the item in isolation or in relation to theother calls.

 

One area of frustration I had with this view is itsinability to save or export data to another format. This is odd because theFile menu contains Export and Save As selections - but they are always disabledwhen they should be active. The VTune Help files state that these functionsshould work, but the software is not being cooperative. Finally, the producthas a complete lack of context-sensitive integration between the differentviews, which behave more as separate islands of non-relational data thanmultiple views of the same data.

 

Although the Task View allows you to see the collectedperformance data in a grid, the Object View gives you a detailed perspective ofthe overall architecture. As you can see in Figure 5, the Object View displaysthe flow of execution between all the tiers, servers, and objects involved. Themain point of this view is to show how everything works together, rather thanhow everything performs. It's a nice touch, but, more than likely, if you aregoing through the trouble of building a three-tier architecture, you've createda similar diagram already and probably with a lot more detail.

 


Figure 5. The Object View displays the relationship between the tiers,servers, and objects.

 

Get the Most out of VTune

Although VTune has a great deal of built-in functionality,it still requires that you use some common sense and due diligence when itcomes to using the application. For example, VTune is not going to give youuseful data if the load-testing tool or script are not configured properly.Also, if you know your site's search functionality is performing sluggishly,you need not create a test script that stresses the entire site. So try to bespecific about which portions of the site you want to test and analyze. Doingso in small, manageable sections helps prevent information overload and allowsyou to identify the offending code as quickly as possible. So here are a fewtips to help you get the most out of VTune.

 

Use the Object View to ensure you fully understand theapplication's architecture before you try to analyze the performance results.You'll probably save yourself a good deal of frustration.

 

Use the Tier View to see if one tier is monopolizing amajority of the response time. Doing so could save you the trouble ofre-indexing your database when all you need is better use of the ASP.NETcaching abilities.

 

Use the Machine View to determine whether your performancedata is possibly being skewed by a misbehaving Web or application server. Itcould also be that the database server simply needs additional memory orprocessors. Don't waste your time analyzing the code when the hardware is whatyou really need to upgrade. This type of information can help you determinewhether you need to scale out or scale up. In these cases, you should measurethe cost of VTune against the cost of making a wrong choice between hardwareupgrades, increasing the consulting budget, etc.

 

Remember to use the Task View to focus on code that has ahigh Load value. Because Load is calculated as a product of the averageresponse time and number of occurrences, lowering this number might be a littletricky. It might be that the code cannot be optimized to run any faster. But ifyou can reduce the number of times the code is executed, you might increase theperformance of that area significantly.

 

Changing one thing at a time is possibly the most importanttip. Rerun tests to see what benefit, if any, was achieved. Changing multipleitems and then retesting might allow you to realize a performance gain, but nota knowledge gain. Sometimes the most important benefit of the optimizationprocess is determining what mistakes were made so you can learn from them andprevent them from recurring.

 

Intel's VTune Enterprise Analyzer for Web Applications canbe an invaluable tool if you need help testing a three-tier applicationarchitecture for development performance issues - before they become productionperformance issues. You also can use VTune in a production environment as adiagnostic tool for when issues arise inexplicably, though Intel hasn'trecognized it to be used for that purpose.

 

The .NET Framework is an outstanding foundation on whichto build robust three-tier architectures. But it can still be a very dauntingtask, and Visual Studio .NET falls a little short when building fully optimizedenterprise systems. It's precisely this gap that VTune Enterprise Analyzer ismeant to fill, and, when used correctly, it can help you get the most out ofyour applications.

 

Ken McNamee is a senior software engineer withRelayHealth Corp., the premier provider of secure, Web-based doctor-patientcommunication services. Prior to this, he led a team of developers inre-architecting the Home Shopping Network's e-commerce site, HSN.com, to 100percent ASP.NET with C#. E-mail him at mailto:[email protected].

 

asp:factfile

VTune Enterprise Analyzer for Web Applications is aperformance diagnosis tool for analyzing three-tier Web architectures.

 

  • Gives detailed performance information on ASP.NET pageresponse time, calls to SQL Server databases, and DCOM, Web Services, and .NETRemoting calls.

  • Requires Windows 2000 with SP2 or greater.

  • Requires SQL Server 2000 on the database tier.

  • Can be used with either Windows DNA or .NET Webapplications.

  • Straightforward installation with good instructions.

  • Includes four licenses for VTune Performance Analyzer6.0, which list for $700 apiece.

 

Intel Corp.

2200 Mission College Blvd.

Santa Clara, Calif. 95052

 

Rating:

Phone: (408) 765-8080

E-mail: mailto:[email protected]

Web Site: http://www.intel.com

Price: $12,500

 

Tell us what you think! Please send any comments aboutthis article to [email protected].Please include the article title and author.

 

 

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like