Performance Testing using JMETER

Performance testing is a process of checking if your applications can withstand the desired load. It is a process to ensure the code changes do not break or reduce performance of the existing application. In principle it is a meticulous process to ensure that applications response times are within the limits under the needed load conditions.

Peak Load:
It is the number of transactions or requests that the application is expected to get during the peak hour of Website/Application.

How to Conduct Performance Testing:
  1. Collect all Business hypercritical functionalities.
  2. Recognize the number of requests for each transaction.
    1. You will get this details from your business team
    2. You can also parse access logs of your application and derive numbers.
  3. Identify your existing or concurrent users
    1. How many users will access your application simultaneously during the busiest period.
  4. Design your test scripts in a suitable performance testing tool ( Say JMeter/Silk Performer/jload etc)
  5. Run the test for single user
  6. Run the test for multiple users
  7. Design the workload pattern either step up pattern or steady state

What are the things you have to monitor?
  1. Response times
  2. Latency
  3. Average Response times
  4. 90th Percentile of response times
  5. Number of requests per second
  6. Number of transactions per second
  7. Vailable bandwidth consumed.
  8. Load average, CPU average, Memory usage of all your application servers, web servers and Database servers
  9. Examine the time consuming queries
  10. Check for most frequently used queries.
  11. Concurrent users over time.
  12. Response times over time in the sense the response times might increase with the increase in load.

What is the possibility of things can go wrong in your load test:

  1. Make sure that you have sufficient bandwidth to run the performance test
    1. Keep all the stakeholders informed who might get impacted with the test
    2. Estimate the required bandwidth for your test and add some more buffer to it.
  2. Keep your test data before you start the load test.
  3. Keep an eye of Caching ( Varnish or CDN networks can kill your test)
    1. Do you really think that you need to test your varnish servers?
    2. If answer is NO, then by pass Varnish and test( Add query parameter in url with a timestamp)
  4. Have the test infrastructure with sufficient number of Load Generators.
  5. Have a good connectivity to your servers from the Load Generators
  6. Ensure the reuired changes are made at Firewall & LB level to allow plenty of requests.
  7. Examine that all the servers gets equal number of requests. Otherwise one server might get bombarded with requests and other servers might not receive as many requests. It may impact up the load test results.
  8. Sometimes response times might be increased only at few servers and might be good in other servers. In this case considering average is the best approach.

No comments:

Post a Comment