SlideShare uma empresa Scribd logo
1 de 62
Baixar para ler offline
Performance &
 Load Testing



  Stéphane Landelle

         CTO
 eBusiness Information

      @slandelle
Concepts
Define performance?
   ● fast?
   ● robust?
   ● resource effective?



 => Define your requirements!
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
Put things into perspective
Product Owner requirement :
   Every page should show up under 200ms

                      WRONG !

           User expectations = per use case!
Speed matters

● More traffic

● Better conversion rate

● Less angry users
Some figures


Google :
Results/page : 10 => 30
-> +500 ms
-> -20% pages seen


Amazon :
+100 ms
-> -1 % sales
estimated annual cost : $160M
Load tests : why ?
         Load tests
             =
know your app & infrastructure



          No load tests
                =
potential problems in production
                =
           angry users
Methodology
Clicking everywhere/Selenium = not a load test !



● You expect more than 1 user



● "Seems fast enough." => Not a metric !
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...
Methodology


● Analyze = Data = Monitoring
● Fix hotspot
● Iterate!
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. Gomez's basic perf webapp
Types of load tests

● Capacity Test

● Stress Test

● Endurance Test
Capacity Test

Goal :
Determine how much load your system can hold



How :
Repeat the same scenario over and over, but add virtual
users every time until performance starts degrading.
A response time under 1 s is expected

-> user cap : 1500 users
Stress Test
Goal :
Study system behavior in case of heavy load, during AND
after



How :
Find the max load your system can handle, and then run
the scenario with a heavier load.
10k users for 1 min, then 1k :
webapp struggles, but stabilizes
Endurance Test
Goal :
Validate system behavior after a long period of activity.



How :
Run the scenario with a manageable load, but for a long
period of time (several hours at least).
Fast memory leak :
Runs fine for 2 minutes until heap's full...
Ramps
Start virtual users progressively, because that's what real
users do !
Ramps also help to warm up your system.
Reports
The purpose of load injectors : stress your app and
produces reports

● Meaningful reports help developers analyze stress tests
   results and what to make of them

● Something shiny to give to your boss
The good, the bad and the ugly
               metrics
Every 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
Percentiles to the rescue



          nth percentiles
                 =
   n % of users' response time
Part of the development process
Like any other functional test, load testing should be :

● integrated early in the development cycle

● automated

● versioned
Gatling
Yet Another Stress Tool

JMeter, Grinder, Tsung,
        LoadUI,
LoadRunner, Neoload…
Issue #1
High Performance




   http://www.shopfbparts.com/catalog/nal-19201331_w.jpg
1 user = 1 thread
With 50 threads on a JVM
With 2000 threads on a JVM
Blocking I/O
Threads? Waiting…
… and
sleeping
Is that a real problem?
Can you trust your results?




  JMeter 2.8 perf test, expecting 300 tr/sec
Issue #2

Usability
Graphical User Interface

                  Listen, it's not
                  that
                  complicated...
Issue #3

Maintainability
What was this change about?
Gatling can
                                     change all
                                     that!




http://static.lexpress.fr/medias/15/mai-68_124.
               jpg, copyright by AFP
Say hello to my little friend…




          Version 1.4.1
     Released January 2013
Be asynchronous,
embrace the actor model
Use non-blocking I/O



● Async HTTP Client
● Netty
Scenario
  = Code
(Scala)
  = DSL
Easy
Use the rich DSL…
Checks

         ●   regex / css / xpath / jsonPath
         ●   find / findAll / count
         ●   is / in / not / whatever


Structures

         ●   doIf / repeat / during / asLongAs
         ●   randomSwitch / roundRobinSwitch


Error handling

         ●   tryMax / exitBlockOnFail


Feeders

         ●   csv / tsv / jdbc
… or write your own Scala
         code…
…or use the Recorder
Integrations
●   Maven Plugin
●   Maven archetype (run in IDE)

●   Jenkins plugin




●   Graphite live reporting
Coming soon…



●   Websockets, JDBC…
●   Clustering
Demo
Gatling at Ezakus
Ezakus Architecture
Metrics

110 M Http hits by day

Peak : 3 000 req/s
Gatling usage - Simulations
Gatling usage - Example
Gatling usage - Results
Gatling usage - Results
Conclusion
Really efficient?




   Jmeter perf test
   run with Gatling,
http://gatling-tool.org
https://github.com/excilys/gatling
@GatlingTool




https://github.com/slandelle
@slandelle

Mais conteúdo relacionado

Mais procurados

Boost your App with Gatling
Boost your App with GatlingBoost your App with Gatling
Boost your App with GatlingKnoldus Inc.
 
Continuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatlingContinuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatlingTim van Eijndhoven
 
Continuous performance: Load testing for developers with gatling @ JavaOne 2016
Continuous performance: Load testing for developers with gatling @ JavaOne 2016Continuous performance: Load testing for developers with gatling @ JavaOne 2016
Continuous performance: Load testing for developers with gatling @ JavaOne 2016Tim van Eijndhoven
 
Apache JMeter Introduction
Apache JMeter IntroductionApache JMeter Introduction
Apache JMeter IntroductionSøren Lund
 
Gatling overview
Gatling overviewGatling overview
Gatling overviewViral Jain
 
Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Alin Pandichi
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy Docker, Inc.
 
Building high-performance web applications with Preact
Building high-performance web applications with PreactBuilding high-performance web applications with Preact
Building high-performance web applications with PreactMaurice De Beijer [MVP]
 
Antifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureAntifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureDiUS
 
JavaScript Metaprogramming with ES 2015 Proxy
JavaScript Metaprogramming with ES 2015 ProxyJavaScript Metaprogramming with ES 2015 Proxy
JavaScript Metaprogramming with ES 2015 ProxyAlexandr Skachkov
 
Основы нагрузочного тестирования с инструментом Jmeter
Основы нагрузочного тестирования с инструментом JmeterОсновы нагрузочного тестирования с инструментом Jmeter
Основы нагрузочного тестирования с инструментом JmeterКомпьютерная школа Hillel
 
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...Alex Balhatchet
 
Load Testing with Taurus using Jenkins and AWS
Load Testing with Taurus using Jenkins and AWSLoad Testing with Taurus using Jenkins and AWS
Load Testing with Taurus using Jenkins and AWSGuy Salton
 
Understanding Reactive Programming
Understanding Reactive ProgrammingUnderstanding Reactive Programming
Understanding Reactive ProgrammingAndres Almiray
 
Stress driven development
Stress driven developmentStress driven development
Stress driven developmentmitesh_sharma
 

Mais procurados (20)

Boost your App with Gatling
Boost your App with GatlingBoost your App with Gatling
Boost your App with Gatling
 
Test driving-qml
Test driving-qmlTest driving-qml
Test driving-qml
 
Gatling
Gatling Gatling
Gatling
 
Continuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatlingContinuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatling
 
Continuous performance: Load testing for developers with gatling @ JavaOne 2016
Continuous performance: Load testing for developers with gatling @ JavaOne 2016Continuous performance: Load testing for developers with gatling @ JavaOne 2016
Continuous performance: Load testing for developers with gatling @ JavaOne 2016
 
Test driving QML
Test driving QMLTest driving QML
Test driving QML
 
Apache JMeter Introduction
Apache JMeter IntroductionApache JMeter Introduction
Apache JMeter Introduction
 
Gatling overview
Gatling overviewGatling overview
Gatling overview
 
Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)
 
Jmeter
JmeterJmeter
Jmeter
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy
 
Building high-performance web applications with Preact
Building high-performance web applications with PreactBuilding high-performance web applications with Preact
Building high-performance web applications with Preact
 
Antifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureAntifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failure
 
JavaScript Metaprogramming with ES 2015 Proxy
JavaScript Metaprogramming with ES 2015 ProxyJavaScript Metaprogramming with ES 2015 Proxy
JavaScript Metaprogramming with ES 2015 Proxy
 
Основы нагрузочного тестирования с инструментом Jmeter
Основы нагрузочного тестирования с инструментом JmeterОсновы нагрузочного тестирования с инструментом Jmeter
Основы нагрузочного тестирования с инструментом Jmeter
 
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
 
Load Testing with Taurus using Jenkins and AWS
Load Testing with Taurus using Jenkins and AWSLoad Testing with Taurus using Jenkins and AWS
Load Testing with Taurus using Jenkins and AWS
 
Understanding Reactive Programming
Understanding Reactive ProgrammingUnderstanding Reactive Programming
Understanding Reactive Programming
 
Stress driven development
Stress driven developmentStress driven development
Stress driven development
 
Jmeter introduction
Jmeter introductionJmeter introduction
Jmeter introduction
 

Destaque

Blast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane LandelleBlast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane LandelleZeroTurnaround
 
Gatling - Stress test tool
Gatling - Stress test toolGatling - Stress test tool
Gatling - Stress test toolKnoldus Inc.
 
Load testing with gatling
Load testing with gatlingLoad testing with gatling
Load testing with gatlingChris Birchall
 
How to Cover All Your Backend Testing Needs with API and UI Tests
How to Cover All Your Backend Testing Needs with API and UI TestsHow to Cover All Your Backend Testing Needs with API and UI Tests
How to Cover All Your Backend Testing Needs with API and UI TestsBlazeMeter
 
'Shift-Right' - Rapid Evolution with DesignOps
'Shift-Right' - Rapid Evolution with DesignOps'Shift-Right' - Rapid Evolution with DesignOps
'Shift-Right' - Rapid Evolution with DesignOpsCA Technologies
 
Pre-Con Lab: Test Automation Across Nine Open Source Tools—Taurus
Pre-Con Lab: Test Automation Across Nine Open Source Tools—TaurusPre-Con Lab: Test Automation Across Nine Open Source Tools—Taurus
Pre-Con Lab: Test Automation Across Nine Open Source Tools—TaurusCA Technologies
 
Skinny Framework 1.0.0
Skinny Framework 1.0.0Skinny Framework 1.0.0
Skinny Framework 1.0.0Kazuhiro Sera
 
Beyond JSON - An Introduction to FlatBuffers
Beyond JSON - An Introduction to FlatBuffersBeyond JSON - An Introduction to FlatBuffers
Beyond JSON - An Introduction to FlatBuffersMaxim Zaks
 
Zero to Sixty: AWS OpsWorks (DMG202) | AWS re:Invent 2013
Zero to Sixty: AWS OpsWorks (DMG202) | AWS re:Invent 2013Zero to Sixty: AWS OpsWorks (DMG202) | AWS re:Invent 2013
Zero to Sixty: AWS OpsWorks (DMG202) | AWS re:Invent 2013Amazon Web Services
 

Destaque (9)

Blast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane LandelleBlast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane Landelle
 
Gatling - Stress test tool
Gatling - Stress test toolGatling - Stress test tool
Gatling - Stress test tool
 
Load testing with gatling
Load testing with gatlingLoad testing with gatling
Load testing with gatling
 
How to Cover All Your Backend Testing Needs with API and UI Tests
How to Cover All Your Backend Testing Needs with API and UI TestsHow to Cover All Your Backend Testing Needs with API and UI Tests
How to Cover All Your Backend Testing Needs with API and UI Tests
 
'Shift-Right' - Rapid Evolution with DesignOps
'Shift-Right' - Rapid Evolution with DesignOps'Shift-Right' - Rapid Evolution with DesignOps
'Shift-Right' - Rapid Evolution with DesignOps
 
Pre-Con Lab: Test Automation Across Nine Open Source Tools—Taurus
Pre-Con Lab: Test Automation Across Nine Open Source Tools—TaurusPre-Con Lab: Test Automation Across Nine Open Source Tools—Taurus
Pre-Con Lab: Test Automation Across Nine Open Source Tools—Taurus
 
Skinny Framework 1.0.0
Skinny Framework 1.0.0Skinny Framework 1.0.0
Skinny Framework 1.0.0
 
Beyond JSON - An Introduction to FlatBuffers
Beyond JSON - An Introduction to FlatBuffersBeyond JSON - An Introduction to FlatBuffers
Beyond JSON - An Introduction to FlatBuffers
 
Zero to Sixty: AWS OpsWorks (DMG202) | AWS re:Invent 2013
Zero to Sixty: AWS OpsWorks (DMG202) | AWS re:Invent 2013Zero to Sixty: AWS OpsWorks (DMG202) | AWS re:Invent 2013
Zero to Sixty: AWS OpsWorks (DMG202) | AWS re:Invent 2013
 

Semelhante a Performance & Load Testing: Understanding User Experience and System Capacity

Performance Test Automation With Gatling
Performance Test Automation  With GatlingPerformance Test Automation  With Gatling
Performance Test Automation With GatlingKnoldus Inc.
 
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...InfluxData
 
Netflix SRE perf meetup_slides
Netflix SRE perf meetup_slidesNetflix SRE perf meetup_slides
Netflix SRE perf meetup_slidesEd Hunter
 
Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeterMikael Kundert
 
Velocity 2015: Building Self-Healing Systems
Velocity 2015: Building Self-Healing SystemsVelocity 2015: Building Self-Healing Systems
Velocity 2015: Building Self-Healing SystemsSOASTA
 
Velocity 2015 building self healing systems (slide share version)
Velocity 2015 building self healing systems (slide share version)Velocity 2015 building self healing systems (slide share version)
Velocity 2015 building self healing systems (slide share version)SOASTA
 
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache KafkaStrata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafkaconfluent
 
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Martin Spier
 
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...Red Hat Developers
 
Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first designKyrylo Reznykov
 
Introduction to Apache Apex - CoDS 2016
Introduction to Apache Apex - CoDS 2016Introduction to Apache Apex - CoDS 2016
Introduction to Apache Apex - CoDS 2016Bhupesh Chawda
 
Real-time Stream Processing using Apache Apex
Real-time Stream Processing using Apache ApexReal-time Stream Processing using Apache Apex
Real-time Stream Processing using Apache ApexApache Apex
 
Lessons learned from designing QA automation event streaming platform(IoT big...
Lessons learned from designing QA automation event streaming platform(IoT big...Lessons learned from designing QA automation event streaming platform(IoT big...
Lessons learned from designing QA automation event streaming platform(IoT big...Omid Vahdaty
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web ApplicationsJohn McCaffrey
 
Ad109 - XPages Performance and Scalability
Ad109 - XPages Performance and ScalabilityAd109 - XPages Performance and Scalability
Ad109 - XPages Performance and Scalabilityddrschiw
 
3 Keys to Performance Testing at the Speed of Agile
3 Keys to Performance Testing at the Speed of Agile3 Keys to Performance Testing at the Speed of Agile
3 Keys to Performance Testing at the Speed of AgileNeotys
 
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...Codemotion
 
Real World AngularJS recipes: beyond TodoMVC
Real World AngularJS recipes: beyond TodoMVCReal World AngularJS recipes: beyond TodoMVC
Real World AngularJS recipes: beyond TodoMVCCarlo Bonamico
 
Production debugging web applications
Production debugging web applicationsProduction debugging web applications
Production debugging web applicationsIdo Flatow
 

Semelhante a Performance & Load Testing: Understanding User Experience and System Capacity (20)

Performance Test Automation With Gatling
Performance Test Automation  With GatlingPerformance Test Automation  With Gatling
Performance Test Automation With Gatling
 
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
 
Netflix SRE perf meetup_slides
Netflix SRE perf meetup_slidesNetflix SRE perf meetup_slides
Netflix SRE perf meetup_slides
 
Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeter
 
Velocity 2015: Building Self-Healing Systems
Velocity 2015: Building Self-Healing SystemsVelocity 2015: Building Self-Healing Systems
Velocity 2015: Building Self-Healing Systems
 
Velocity 2015 building self healing systems (slide share version)
Velocity 2015 building self healing systems (slide share version)Velocity 2015 building self healing systems (slide share version)
Velocity 2015 building self healing systems (slide share version)
 
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache KafkaStrata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
 
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
 
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
 
Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first design
 
Introduction to Apache Apex - CoDS 2016
Introduction to Apache Apex - CoDS 2016Introduction to Apache Apex - CoDS 2016
Introduction to Apache Apex - CoDS 2016
 
Real-time Stream Processing using Apache Apex
Real-time Stream Processing using Apache ApexReal-time Stream Processing using Apache Apex
Real-time Stream Processing using Apache Apex
 
Lessons learned from designing QA automation event streaming platform(IoT big...
Lessons learned from designing QA automation event streaming platform(IoT big...Lessons learned from designing QA automation event streaming platform(IoT big...
Lessons learned from designing QA automation event streaming platform(IoT big...
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web Applications
 
Ad109 - XPages Performance and Scalability
Ad109 - XPages Performance and ScalabilityAd109 - XPages Performance and Scalability
Ad109 - XPages Performance and Scalability
 
3 Keys to Performance Testing at the Speed of Agile
3 Keys to Performance Testing at the Speed of Agile3 Keys to Performance Testing at the Speed of Agile
3 Keys to Performance Testing at the Speed of Agile
 
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
Real World AngularJS recipes: beyond TodoMVC - Carlo Bonamico, Sonia Pini - C...
 
Real World AngularJS recipes: beyond TodoMVC
Real World AngularJS recipes: beyond TodoMVCReal World AngularJS recipes: beyond TodoMVC
Real World AngularJS recipes: beyond TodoMVC
 
Fundamentals Performance Testing
Fundamentals Performance TestingFundamentals Performance Testing
Fundamentals Performance Testing
 
Production debugging web applications
Production debugging web applicationsProduction debugging web applications
Production debugging web applications
 

Performance & Load Testing: Understanding User Experience and System Capacity