views:

155

answers:

4

Hi.

I have some basic questions around understanding fundamentals of Performance testing. I know that under various circumstances we might want to do - Stress Testing - Endurance Testing etc. But my main objective here is to ensure that response time is decent from application under a set of load which is towards a higher end or in least above average load.

My questions are as follows:

  1. When you start to plan your expected response time of application; what do you consider. If thats the first step at all. I mean, I have a web application now. Do I just pull out a figure from air and say "I would expect application to take 3 seconds to respond to each request". and then go about figuring out what my application is lacking to get that response time?

  2. OR is it the other way round, and you start performance test with a given set of hardware and say, lets see what response time I get now, and then look at results and say, well it's 8 seconds right now, I'd like it to be 3 seconds at max, so lets see how we can optimize it to be 3 seconds? But again is 3 seconds out of air? I am sure, scaling up machines only will not get response time up. It'll get response time up only when single machine/server is under load and you start clustering?

  3. Now for one single user I have response time as 3 seconds but as the load increases it goes down exponentially; so where do I draw the line between "I need to optimize code further" (which has it's upper limit) and "I need to scale up my servers" (Which has a limit too)

  4. What are the best free tools to do performance and load testing? I have used Jmeter a bit. But is there anything else, that is good and open source?

  5. If I have to optimize code, I start profiling the specific flows which took lot of time responding to requests?

Basically I'd like to see how one goes about from end to end doing performance testing for their application. Any links or articles would be very helpful.

Thanks.

A: 

First of all, design your application properly.

Use a profiler, see where the bottlenecks in your application are, and take them away if possible. MEASURE performance before improving it.

lbp
If I understand correctly, profiling an application should be last resort. I mean, it's not easy to do and you I do not want to spend precious time in it, if by plucking low hanging fruit I can get my system to work reasonably well? To support my argument here is a video http://video.google.com/videoplay?docid=-6891978643577501895#
Priyank
I watched the first minutes of the video and that reminded me that you can create micro-benchmarks in the form of unit tests. In most unit test frameworks, you can set a timeout. If the test doesn't finish within that time, it fails. Now if you have such a failing test, you can profile that test to see where exactly the problem is.
lbp
+2  A: 

First of all you can read

Best Practices for Speeding Up Your Web Site

For tools

Open source performance testing tools

performance: tools

rahul
+2  A: 

The Performance Testing Council is your gateway to freely exchange experiences, knowledge, and practice of performance testing.

Also read Microsoft Patterns & Practises for Performance testing. This guide shows you an end-to-end approach for implementing performance testing.

phoenix mentioned the Open Source tools.

Sauron
+1  A: 

This link and this show an example and method of performance tuning an application when the application does not have any obvious "bottlenecks". It works most intuitively on individual threads. I have no experience using it on web applications, although other people do. I agree that profiling is not easy, but I've always relied on this technique, and I think it is pretty easy / effective.

Mike Dunlavey