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.
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:
- Collect all Business hypercritical functionalities.
- Recognize the number of requests for each transaction.
- You will get this details from your business team
- You can also parse access logs of your application and derive numbers.
- Identify your existing or concurrent users
- How many users will access your application simultaneously during the busiest period.
- Design your test scripts in a suitable performance testing tool ( Say JMeter/Silk Performer/jload etc)
- Run the test for single user
- Run the test for multiple users
- Design the workload pattern either step up pattern or steady state
What are the things you have to monitor?
- Response times
- Average Response times
- 90th Percentile of response times
- Number of requests per second
- Number of transactions per second
- Vailable bandwidth consumed.
- Load average, CPU average, Memory usage of all your application servers, web servers and Database servers
- Examine the time consuming queries
- Check for most frequently used queries.
- Concurrent users over time.
- 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:
- Make sure that you have sufficient bandwidth to run the performance test
- Keep all the stakeholders informed who might get impacted with the test
- Estimate the required bandwidth for your test and add some more buffer to it.
- Keep your test data before you start the load test.
- Keep an eye of Caching ( Varnish or CDN networks can kill your test)
- Do you really think that you need to test your varnish servers?
- If answer is NO, then by pass Varnish and test( Add query parameter in url with a timestamp)
- Have the test infrastructure with sufficient number of Load Generators.
- Have a good connectivity to your servers from the Load Generators
- Ensure the reuired changes are made at Firewall & LB level to allow plenty of requests.
- 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.
- 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.