| By Richard Campbell | Article Rating: |
|
| January 11, 2009 08:00 AM EST | Reads: |
4,733 |
Actually instrumenting an application to compute this equation can be challenging. There are fairly simple tools available, like YSlow for the browser, www.websiteoptimization.com, PING, and others that can provide some values, like Payload, Bandwidth, RTT and AppTurns. But for server and client compute times, largely the only way to derive those values is to write code for them - adding in measurements within the application to log how long those portions of the equation are taking.
Once your application is instrumented, you need to start taking baseline measurements. What does good performance look like? What does bad performance look like? Under what conditions do these problems exist?
Now you start pressing against the difference between performance issues and scaling issues. A performance issue exists when a Web 2.0 application request takes too long with only a single user. A scaling issue exists when the single user performance is sufficient, but as the number of users increases, the performance degrades. The challenge here is that no one ever complains about scaling issues. You will never hear a user say, "The web site isn't scaling well." In reality, they say, "The site is too slow!" It is up to you to determine whether you have an actual performance issue or a scaling issue.
Looking at the performance equation, where do scaling issues turn up? Payload, round-trip time and appturns scale uniformly - they are normally the same regardless of the number of users. Bandwidth is rarely a problem; last time I looked, the Internet scales pretty well. Even client compute time scales fairly well, since the number of clients increases with scale.
Ultimately, scaling issues appear as server compute time. When those times rise with the number of users, you can be sure you're dealing with a scaling issue.
Strategies for Performance Tuning Web 2.0 Apps
Instrumentation only tells you where your performance problems are, it does not tell you how to solve them. The performance equation helps you focus on the actual issues and help measure the results of your efforts to improve things.
Perhaps you can see through the performance equation that a substantial portion of your performance problems has to do with round-trip time - you have so many resource files per request that a big chunk of the total response time is waiting for those files to arrive. Consolidating those files down should be an easy way to improve performance.
The same could be said for payload size or even bandwidth: there are relatively straightforward ways to improve these, such as compression for payload or simply buying more bandwidth.
But once you're digging into server compute time, you're dealing with a tougher nut to crack. Now comes the performance strategies of specialization and distribution.
With specialization, you break down your application into areas of specialization. This might be at the resource level, separating web page computation from static resource services. Moving your static resource files into dedicated hardware, whether your own or external, is one form of specialization.
Another specialization is isolating SSL services. You might have only a few pages in your application that require SSL; having dedicated hardware for that service lets the rest of the application avoid dealing with the computationally intensive aspects of SSL.
A key advantage of specialization is that it assists with instrumentation. Each specialization can be instrumented independently so that you have an even deeper view into where performance problems lie in your application.
Distribution is the performance technique most people think of - throw more hardware at it. The problem with distribution is that it doesn't provide uniform results. Doubling the amount of computing horsepower for an application does not double the number of users it can support. In fact, there is a progression of diminishing returns where adding more hardware will provide no benefit or even make the application go slower.
However, distribution is an effective strategy as long as it is implemented judiciously. The key is to use the strategy of specialization first to break down the various elements of the application so that each can be distributed independently of the other.
Another key challenge to distribution is affinity. Often Web 2.0 applications have singleton dependencies - places in the application that require a unique resource that has to remain centralized. This creates an affinity for a given user to a given server. One form of affinity is session data, the transitory needed to maintain state information about a given user's session while they are interacting with the application. If that session data is stored on the application server, that user is considered to be affinite to that server.
Affinity causes scaling problems because users cannot move freely from server to server as load increases. Moving session data to an independent data store removes that affinity and improves overall performance under scale.
Most people consider databases to be singletons, insisting that a given record be stored in one place once to maintain consistency. But in large-scale Web 2.0 applications, even databases can be distributed, separating reading from writing and partitioning data across multiple servers. One of the effects of this sort of distribution is latency - there's a delay between the time of adding a new record to the database and that data being visible to the rest of the system.
It's almost impossible to anticipate where performance problems will arise in a Web 2.0 application. It depends on how the application gets used and how often utilization changes from day to day. Deep instrumentation of your application can help you see where problems are and point you in the right direction to solve them.
Implementing specialization helps instrumentation be even more effective and simplifies distribution when more performance is needed. New techniques like virtualizaton and cloud computing ultimately benefit from instrumentation, specialization, and distribution as well. The techniques I've outlined in this article can be applied to these new technologies and others as Web 2.0 applications move into the enterprise.
Published January 11, 2009 Reads 4,733
Copyright © 2009 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Richard Campbell
Richard Campbell is a Microsoft Regional Director for British Columbia and is recognized as a Microsoft Most Valuable Professional (MVP) in the area of ASP.NET development. His PWOP Productions creates a variety of multimedia programs including ".NET Rocks!, the Internet Audio Talk Show for .NET Developers," a podcast produced twice a week for about 150,000 listeners. Richard has contributed nearly 300 Advisor columns to Microsoft Access Advisor, and is the author of courseware for AppDev's national SQL Server 7.0 training seminars and video series. Since 1995, Richard has been a regular speaker on the technical-conference circuit and, in 2006, was ranked the top speaker at Tech Ed Asia in Kuala Lumpur, Malaysia. The son of an electrical engineer, Richard was tinkering with microcomputers at age 10 and, by 16, had started his own business developing custom software.
![]() |
shirley 01/08/09 09:54:30 PM EST | |||
SharePoint 2007 can support Web 2.0. |
||||
- The Top 150 Players in Cloud Computing
- 4th International Cloud Computing Conference & Expo Starts Today
- Yahoo! to Keynote 4th Cloud Expo: Accelerating Innovation with Cloud Computing
- Exclusive Q&A with Rich Marcello - Unisys President, Systems & Technology
- The Economics of Cloud Computing Analyzed
- Industry Experts Discuss the State of Cloud Computing
- CIA was Headed to an Enterprise Cloud All Along: Jill Tummler Singer
- Publishing Synergy: Blog, Twitter and Ulitzer
- Akamai Named “Silver Sponsor” of Cloud Computing Expo
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Cloud Computing on Gartner's Top 10 List and SYS-CON Events' 2010 Calendar
- Cloud Expo New York Call for Papers Deadline December 15
- The Top 150 Players in Cloud Computing
- 4th International Cloud Computing Conference & Expo Starts Today
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Yahoo! Named “Platinum Sponsor” of Cloud Computing Expo
- Yahoo! to Keynote 4th Cloud Expo: Accelerating Innovation with Cloud Computing
- SYS-CON.TV: Cloud Computing Expo Power Panel
- Exclusive Q&A with Rich Marcello - Unisys President, Systems & Technology
- Unisys Named “Platinum Sponsor” of Cloud Computing Expo
- The Economics of Cloud Computing Analyzed
- 1st Annual GovIT Expo: Letter from the Technical Chair
- Deputy CIO of the CIA to Keynote 1st Annual GovIT Expo
- Industry Experts Discuss the State of Cloud Computing
- Virtualization Conference Keynote Webcast Live on SYS-CON.TV
- The Top 150 Players in Cloud Computing
- SOA 2 Point Oh No!
- The Top 250 Players in the Cloud Computing Ecosystem
- What is Cloud Computing?
- Cloud Computing Expo Europe 2009 in Prague: Themes & Topics
- IBM's Got Its Head in the Clouds
- Cloud Computing Expo 2009 West: Call for Papers Now Closed
- Red Hat Named "Platinum Sponsor" of Virtualization Conference & Expo
- As Google's SaaS Assault Begins, Move Over Microsoft Office?
- From Enterprise to Cloud, Virtualization Today on SYS-CON.TV
- Twenty-One Experts Define Cloud Computing





























