Tuesday, June 1, 2010

Performance Testing - Three Tips.

Performance Testing - Three Tips.


Testing database-backed applications for performance can be a daunting task. The worst-case scenario: Performance testing efforts drain engineering resources and yet somehow nasty surprises still manage to pop up in production.
These three tips can help you get the most out of your application performance testing efforts.
  1. Set clear performance metrics and targets with input from business stakeholders. Ideally this should be part of the system requirements and user acceptance testing. Otherwise, without obvious targets to hit, performance testing becomes an open-ended slog that may still leave end users dissatisfied with system performance if their expectations have not been accounted for. 
  2. Don't forget the database. For Web-based transactional systems, in particular, the most common metrics are number of concurrent user sessions and response time. Applications also are frequently load-tested to check the impact of ramping up the number of concurrent sessions. However, a single user with the entire system to himself can still experience vastly different performance, depending on the amount of data already in the database. One single user transaction can be lightning fast if it's inserting into an empty table, but it degrades as the table grows to thousands or millions of records. So, performance requirements should also include metrics for expected data sizing, and this sizing should be incorporated in the test environment.  
  3. Don't over design for performance. Some consideration needs to be given to scalability when sizing the initial architecture and making hardware purchases, of course, but there's only so much you can optimize on a system that hasn't been built yet. Get feedback from real users to figure out which parts of the system are most frequently used so you don't waste time optimizing rarely used features. Also, performance tweaks often carry some tradeoffs, such as readability and maintainability, so you need some baseline performance metrics to make good decisions. Don't make big design sacrifices for small optimizations.  

No comments:

Post a Comment