Your SlideShare is downloading. ×
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Gatling - Bordeaux JUG
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Gatling - Bordeaux JUG

1,807

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,807
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
52
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Performance & Load Testing Stéphane Landelle CTO eBusiness Information @slandelle
  • 2. Concepts
  • 3. Define performance? ● fast? ● robust? ● resource effective? => Define your requirements!
  • 4. Web speed is a user experience● <0,5 s : loading looks instantaneous● 0,5-2 s : not instantaneous, but acceptable● > 3 s : users start leaving your site
  • 5. Put things into perspectiveProduct Owner requirement : Every page should show up under 200ms WRONG ! User expectations = per use case!
  • 6. Speed matters● More traffic● Better conversion rate● Less angry users
  • 7. Some figuresGoogle :Results/page : 10 => 30-> +500 ms-> -20% pages seenAmazon :+100 ms-> -1 % salesestimated annual cost : $160M
  • 8. Load tests : why ? Load tests =know your app & infrastructure No load tests =potential problems in production = angry users
  • 9. MethodologyClicking everywhere/Selenium = not a load test !● You expect more than 1 user● "Seems fast enough." => Not a metric !
  • 10. Methodology Comes after proper local perf testing● Client/Network optimization: minification, javascript, sprites, caching... ○ Tools : Developer Tools, YSlow, Google PageSpeed Insights...● Application debugging: 50 SQL queries/page = BUG! ○ Tools : VisualVM, Yourkit, JProfiler, MAT...
  • 11. Methodology● Analyze = Data = Monitoring● Fix hotspot● Iterate!
  • 12. Tooling● Load injector: Gatling, JMeter, Locust.io...● JVM monitoring: JMXtrans, Yammer Metrics...● System monitoring: Nagios● Network monitoring● Database monitoring● Dashboard: Graphite, Ganglia● Webapp mock: H. Gomezs basic perf webapp
  • 13. Types of load tests● Capacity Test● Stress Test● Endurance Test
  • 14. Capacity TestGoal :Determine how much load your system can holdHow :Repeat the same scenario over and over, but add virtualusers every time until performance starts degrading.
  • 15. A response time under 1 s is expected-> user cap : 1500 users
  • 16. Stress TestGoal :Study system behavior in case of heavy load, during ANDafterHow :Find the max load your system can handle, and then runthe scenario with a heavier load.
  • 17. 10k users for 1 min, then 1k :webapp struggles, but stabilizes
  • 18. Endurance TestGoal :Validate system behavior after a long period of activity.How :Run the scenario with a manageable load, but for a longperiod of time (several hours at least).
  • 19. Fast memory leak :Runs fine for 2 minutes until heaps full...
  • 20. RampsStart virtual users progressively, because thats what realusers do !Ramps also help to warm up your system.
  • 21. ReportsThe purpose of load injectors : stress your app andproduces reports● Meaningful reports help developers analyze stress tests results and what to make of them● Something shiny to give to your boss
  • 22. The good, the bad and the ugly metricsEvery metric can be useful, but some less than others...● Response time min/max = worst case/best case● Mean can be biased in case of extreme values Response time is a physical phenomenon => Statistically distributed
  • 23. Percentiles to the rescue nth percentiles = n % of users response time
  • 24. Part of the development processLike any other functional test, load testing should be :● integrated early in the development cycle● automated● versioned
  • 25. Gatling
  • 26. Yet Another Stress ToolJMeter, Grinder, Tsung, LoadUI,LoadRunner, Neoload…
  • 27. Issue #1High Performance http://www.shopfbparts.com/catalog/nal-19201331_w.jpg
  • 28. 1 user = 1 thread
  • 29. With 50 threads on a JVM
  • 30. With 2000 threads on a JVM
  • 31. Blocking I/O
  • 32. Threads? Waiting…
  • 33. … andsleeping
  • 34. Is that a real problem?
  • 35. Can you trust your results? JMeter 2.8 perf test, expecting 300 tr/sec
  • 36. Issue #2Usability
  • 37. Graphical User Interface Listen, its not that complicated...
  • 38. Issue #3Maintainability
  • 39. What was this change about?
  • 40. Gatling can change all that!http://static.lexpress.fr/medias/15/mai-68_124. jpg, copyright by AFP
  • 41. Say hello to my little friend… Version 1.4.1 Released January 2013
  • 42. Be asynchronous,embrace the actor model
  • 43. Use non-blocking I/O● Async HTTP Client● Netty
  • 44. Scenario = Code(Scala) = DSL
  • 45. Easy
  • 46. Use the rich DSL…Checks ● regex / css / xpath / jsonPath ● find / findAll / count ● is / in / not / whateverStructures ● doIf / repeat / during / asLongAs ● randomSwitch / roundRobinSwitchError handling ● tryMax / exitBlockOnFailFeeders ● csv / tsv / jdbc
  • 47. … or write your own Scala code…
  • 48. …or use the Recorder
  • 49. Integrations● Maven Plugin● Maven archetype (run in IDE)● Jenkins plugin● Graphite live reporting
  • 50. Coming soon…● Websockets, JDBC…● Clustering
  • 51. Demo
  • 52. Gatling at Ezakus
  • 53. Ezakus Architecture
  • 54. Metrics110 M Http hits by dayPeak : 3 000 req/s
  • 55. Gatling usage - Simulations
  • 56. Gatling usage - Example
  • 57. Gatling usage - Results
  • 58. Gatling usage - Results
  • 59. Conclusion
  • 60. Really efficient? Jmeter perf test run with Gatling,
  • 61. http://gatling-tool.orghttps://github.com/excilys/gatling@GatlingToolhttps://github.com/slandelle@slandelle

×