Loadtesting on the Cheap
or
Firepower at your fingertips!
Agenda
- Why this techtalk?
- A simple start
- A riddle...
- Competitors / Comparison of costs
- Roll your own Loadtest
- The Tools
- Run the real deal Loadtest
- Go advanced!
- And then? ANALYZE!
Why this Techtalk?
- Techlist Discussion : [Tech] how to stand the load of football fans
- "The fun behind Loadtesting is equal to...errr... IE6 CSS
optimisation bugfixing"
- A very thin line between performance measuremenent, Systemtesting and Stresstesting
A simple excercise
- mobile.uefa.com
- It's just football fans stupid!
- Client: The Page is slow as hell... please do something!
- Offload traffic to CDN's
- Optimize Caching
- Frontend Performance Considerations
Hey Bastian a simple riddle...
...you've got an untested Server environment with 2 Frontend-Servers and 7 up to 40 on it they get aprox. 90k - 220k Hits/Site each month.
Will this work?
Let me calculate that...
- Sites : avg(7,40) = ~23
- Hits/Month: avg(90k, 220k) = ~155
(23 Sites*155*10^3 hits/months) / (30days*24hours*60minutes) = ~82 Hits / Min...
in plain english... pretty much traffic!
Kyte from Keynote
- pretty cool test planning tool
- Worldwide 240 Test Locations
- Real Browser Tests
Costs : 20k - 40k $ if a consultant plans the tests (Load Pro Plan)
An IT Company from Berne
- Infrastructure: AWS EC2 Instances
- Tool: Jmeter
Costs : 60k - 80k SFR
Selfmade Solution
- Infrastructure: AWS EC2 Instances
- Tool: Grinder
Costs : 120 SFR
The Tools
many more like Apache Bench, Siege, curl-loader
Roll your own Loadtest
- Think like a user
- Record several 'user stories' by using the record Proxy
- Johny Awesome — He browses the news section forward and back all the time and he is a poweruser on some functions
- Lilly Dontknowhere — She uses the search quite intensive with random words
- and so on... be creative
Roll your own Loadtest
- Define the test duration
- Define the # of parallel peak users
- Define the time to reach the peak userload
- Define your Goals (response times)
Run the real deal Loadtest
- First: Test it with local ressources, and finetune the testplans
- Then: Multiply the load by using AWS EC2 as Loadgenerators:
Grinder in the Cloud
Loadgenerators : 10 Hosts with 3 Workers on 5 Threads = 150 parallel users at the same time
Go Advanced!
- Make leverage of using existing apache logs for creating test plans
- Use the Measurements as value to measure if you've gotten faster or not
And then... ANALYZE the DATA!
- Compare the Baseline against your End situation ‐ Measurement
- Analyze the Server Data you've seen:
- High CPU Load — htop, sar, sysstat-package
- High Memory Allocation — htop, sysstat-package
- Check the Logs for Errors
Thanks
for not falling asleep.
Campus Bern
16th of May 2011 19:00, Meteotest Bern
The Start situation aka "Baseline"
You define the Load, The Hits, and the Paralel Threads
The end situation (after your optimisations)