View
93
Download
0
Category
Preview:
Citation preview
Load Testing
Why we need it?What tools to use?
Load Testing Goals- Checking maximum simultaneous requests (Determining infrastructure limits)
- Verifying acceptance of response time during high load
- Verifying system stability under load - look for memory leaks in long tests
- Predict future resource needs and architectural improvements
- Verifying system behaviour after high load
- Evaluating current capacity against defined requirements
More reasons are listed at http://performance-testing.org/performance-testing-reasons
Open Source Tools
- JMeter
- Yandex Tank
- Taurus
JMeterThe Apache JMeter™ application is open source software,
a 100% pure Java application
Steps to start load testing1)Launch application (jmeter.sh for Unix-based systems and
jmeter.bat for Windows)
2)Right-button click on Test Plan and select Add > Threads (Users) > Thread group (preferably jp@gc - Ultimate Thread Group)
3)Configure Start Thread Count (amount of virtual users which will load your website), Startup Time (time for reaching amount of VU defined), Hold Load For (time for holding peak amount of VU defined), Shutdown Time (time for decreasing VUs by stopping requests)
JMeter - Step 2 - Select Ultimate Thread Group
JMeter - Step 3 - Thread’s configuration
Steps to start load testing (part 2)4) Right-button click on Thread and select Add > Config Element > HTTP Request Default
5) Configure Server Name or IP (e.g. youwebsite.com or 123.231.321.123), Port Number (e.g. 80) and Protocol (http or https)
JMeter - Step 4 - select HTTP Request Defaults
JMeter - Step 5 - Configure HTTP Request Defaults
Steps to start load testing (part 3)6) Right-button click on Thread and select Add > Sampler > HTTP Request
7) Configure Path (link to page you would like to test; e.g. /login.php or /blog/about) and specify Method GET
JMeter - Step 6 - Select Sampler HTTP Request
JMeter - Step 7 - Configure Sampler HTTP Request
Steps to start load testing (part 4)8) Right-button click on Thread and select
Add > Listener > jp@gc - Hits per Second
Add > Listener > jp@gc - Response Times vs Threads
Add > Listener > jp@gc - Response Latencies Over Time
Add > Listener > jp@gc - Response Codes per Second
9) Finally… Run test plan by clicking on Start
JMeter - Step 8 - Configure Sampler HTTP Request
JMeter - 30 VUs - Hits per second
JMeter - 30 VUs - Response Time Over Time
JMeter - 30 VUs - Latencies Over Time
JMeter - 30 VUs - Response Codes per Second
NotesUser “Run” > “Clear All” before starting new test
Once you identified the issue with server responses try to decrease Start Threads Count and increase Startup Time to get to accurate value of allowed concurrent connections
IssuesHow to identify issues with JMeter
JMeter - 50 VUs - 500 Response codes
Server is down...
Really down...
Short term solutionsRestart Servers
Tune configuration of web servers
Add more servers
Long term solutionsConsider moving infrastructure to the Cloud
Use CDN
Use different domains for static resources (and fast web servers for them; e.g. Ngnix or lighttpd)
Use memcached for storing mostly used DB queries
Use downstream cacheability headers
Consider moving part of the application logic to microservices
Setup auto-scale at your Cloud provider
Cloud Solutions
Only JMeter?What other tools can be used for load testing?
Load Testing Tools
- JMeter
- Yandex.Tank
- Gatling
- Locust
- Taurus
- The Grinder
Find more at http://alternativeto.net/
Commercial Solutions
Popular Commercial SolutionsSOASTA
https://www.soasta.com/
BlazeMeter
https://www.blazemeter.com/
What Else? (topics for future slides)
Topics related to Load Testing- Functional Tests in JMeter (using runnable JAR files to automate
functional and load testing)
- PDF Reporting. BlazeMeter Sense (former Loadosophia)
- Response Data validation
- Continuous Load Testing. Configuring CI with headless JMeter
- Configuration of Master / Slave nodes to perform load testing using multiple workstations
Thank youQuestions?
Recommended