Approaches to Performance Testing. Part 1

1. Diversity of Approaches to Performance Testing

  • There are many variations within the broad framework of performance testing.
  • There is no universal or consistent set of terminology, and many organizations have their own terms such as “work load testing” and “sweet spot testing”

2. Amount of Load that is put onto the server

  • It can come from two different areas:
    • the number of connections (or virtual users) that are hitting the server simultaneously
    • the amount of think-time each virtual user has between requests to the server
  • The more users hitting the server, the more load will be generated.
  • The shorter the think-time between requests from each user, the greater the load will be on the server.
  • Keep in mind that as you put more load on the server, the throughput will climb, to a point.

3. Baseline/Performance Testing. Concept

  • Baseline — a range of measurements that represent acceptable performance under typical operating conditions.
  • Testers have a baseline for how the system behaves under normal conditions.
  • Baseline can then be used in regression tests to gauge how well a new version of the software performs.
  • Baseline provides a reference point that makes it easier to spot problems when they occur.

4. Benchmark Testing. Concept

  • The key to benchmark testing is to have consistently reproducible results.
  • Benchmark tests should be used to determine if any performance regressions are in the application.
  • Benchmark tests are great for gathering repeatable results in a relatively short period of time.
  • The best way to benchmark is to change one and only one parameter between tests.

5. Benchmark Testing. “Flat” and “Ramp-Up”. Run Modes

  • In case of “Flat” run mode, all of the users are loaded at once, and then run them for a predetermined amount of time.
  • In case of “Rump-Up” run mode, users are loaded step by step.

6. Benchmark Testing. Accuracy of Results

  • An average should be taken of the response time and throughput for a given test.
  • The ramp-up run does not allow for accurate and reproducible averages because the load on the system is constantly changing as the users are being added a few at a time.
  • Therefore, the flat run is ideal for getting benchmark numbers.

7. Capacity Planning. Definition

  • Capacity testing measures the overall capacity of the system and determines at what point response time and throughput become unacceptable.
  • Capacity testing is conducted with normal load to determine the extra capacity where stress capacity is determined by overloading the system until it fails, which is also called a stress load to determine the maximum capacity of a system.

8. Capacity Planning. Goals

  • For capacity planning-type tests, your goal is to show how far a given application can scale under a specific set of circumstances.
  • Often the specific goal is to find out how many concurrent users the system can support below a certain server response time.
  • As an example, the question you may ask is, “How many servers do I need to support 8,000 concurrent users with a response time of 5 seconds or less?”

9. Capacity Planning. Factors to consider

  • How many of total users will be hitting the server concurrently?
  • What the think-time or time between requests for each user will be?
  • It is also important to note that in the real world users won’t be clicking at exactly that interval every time they send a request.

10. Capacity Planning. Running Tests

  • How do I load the users to simulate the load?
  • The best way to do this is to try to emulate how users hit the server during peak hours.
  • Does that user load happen gradually over a period of time?
  • If so, a ramp-up-style load should be used, where x number of users are added ever y seconds.
  • Do all of the users hit the system in a very short period of time all at once?
  • If that is the case, a flat run should be used, where all of the users are simultaneously loaded onto the server.
  • Different styles will produce different results that are not comparable.

11. Capacity Planning. Inaccuracy Explanation

  • The system is able to continually adjust over time during the ramp-up run.
  • If a ramp-up run is done and you find out that the system can support 5,000 users with a response time of 4 seconds or less.
  • If we follow that test with a flat run with 5,000 users, we’ll probably find that the average response time of the system with 5,000 users is higher than 4 seconds.
  • This is an inherent inaccuracy in ramp-up runs that prevents them from pinpointing the exact number of concurrent users that a system can support.

12. Capacity Planning. The best way to determine capacity

  • Taking the best of both load types and running a series of tests will yield the best results.
  • For example, using a ramp-up run to determine the range of users that the system can support should be used first.
  • Then, once that range has been determined, doing a series of flat runs at various concurrent user loads within that range can be used to more accurately determine the capacity of the system.

13. Soak/Longevity/Duration/Endurance Tests. Concept

  • This type of testing is conducted for different durations to find out the health of the system in terms of its consistent performance.
  • These tests will show any performance degradations over time via memory leaks, increased garbage collection (GC), the accrual of uncommitted database transactions in a rollback buffer which impact.
  • System resources, or other problems in the system.
  • The longer the test, the more confidence in the system you will have.
  • Endurance testing is conducted either on a normal load or on a stress load.

14. Soak/Longevity/Duration/Endurance Tests. Running

  • These tests should be run for several days to really get a good idea of the long-term health of the application.
  • Make sure that the application being tested is as close to real world as possible with a realistic user scenario (how the virtual users navigate through the application), testing all of the features of the application.
  • Ensure that all the necessary monitoring tools are running so that problems will be accurately detected and tracked down later.
  • Performance parameters like response time, throughput, memory usage, and so forth should be measured and recorded.

15. Peak-Rest/Spike Tests. Concept

  • A spike is an unexpected load which stresses the system.
  • Peak-rest tests are a hybrid of the capacity-planning ramp-up-style tests and soak tests.
  • The goal here is to determine how well the system recovers from a high load (such as one during peak hours of the system), goes back to near idle, and then goes back up to peak load and back down again.
  • This testing ensures whether the system will be stable and responsive under unexpected variations in load.
  • If an unexpected surge appears in the user base, the performance of the system should degrade gracefully rather than come crashing down all of a sudden.
  • Spike testing starts with a less number of users, say one user and then 50 concurrent users and then suddenly the user base is increased.
  • Unexpected surges can make the system become unstable since the system might not be prepared to service a sudden surge of concurrent users.
  • During these tests the possibility of system crashing is very high.

16. Peak-Rest/Spike Tests. During Run

  • A couple of things can be determined from Peak-Test/Spike Tests:
  • Does the system recover on the second “peak” and each subsequent peak to the same level (or greater) than the first peak?
  • Does the system show any signs of memory or GC degradation over the course of the test?
  • The longer this test is run (repeating the peak/idle cycle over and over), the better idea you’ll have of what the long-term health of the system looks like.
  • If an unexpected surge appears in the user base, the performance of the system should degrade gracefully rather than come crashing down all of a sudden.

17. Peak-Rest/Spike Tests. Example

  • In the online shopping application, there could be variable level of activities throughout the day (24 hours).
  • We can anticipate that the activities will be at a peak during midday as compared to the rest of the day.
  • The next figure depicts the different spikes when the system is tested across 24 hours with a surge in activities during midday.

Approaches to Performance Testing. Part 2


Explore posts in the same categories: Performance testing

Tags: , , , , , , , , , , , , , ,

You can comment below, or link to this permanent URL from your own site.

2 Comments on “Approaches to Performance Testing. Part 1”

  1. Sravan Says:

    Very nice………

  2. Good post with Nice explanation. Needed and Useful information.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: