SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
Uncertainty is a recipe for failure!




             TSUNG LOAD TESTING
                           Testing HTTP(S)/ Databases / LDAP/ XMPP..
                                    <insert your plugin here>




   January 2013                                   Steffen Larsen (slarsen@braintrust)
                                                                 twitter: @zooldk
Saturday, January 26, 13
TSUNG INTRO

               Introduction to Tsung

               Walk through the phases of a TSUNG load test

               Mainly talk about using TSUNG on the HTTP protocol

               Show simple use cases (my installation is fcked - sorry!)

               Drink a beer!



Saturday, January 26, 13
TSUNG INTRO                            The purpose of Tsung is to simulate users in order to test the scalability and performance of
                                                 IP based client/server applications.



               Open Source (GPLv2)

               Based on Erlang which implicitly defines it as:

                      Highly concurrent and blazingly fast..

                      Small memory fingerprint (512 bytes for an erlang process vs. 512k default for
                      a JVM stack for a thread)

                      Distributed by the nature of Erlang and easily done (so we can do DDOS!) :-)

               Multi protocol: HTTP (REST, SOAP,WebDav etc), PostgreSQL, MySQL, LDAP,
               XMPP/Jabber. Support for SSL and Cookie handling

               Easy Setup! - no confusing GUI (vi and a DTD is enough). Xorg might not be
               available on the servers.

Saturday, January 26, 13
TSUNG IN HTTP LAND
               Supports both old HTTP 1.0 and 1.1 (Web Sockets on a
               branch)

               GET, POST, PUT, DELETE etc. Methods support

               Cookies are automatically handled

               WWW basic authentication

               Basic support for SOAP using HTTP mode

               Proxy mode to record sessions using a web browser..

Saturday, January 26, 13
TSUNG LIFE CYCLE

  0.write your tsung.xml               1.run
                                                2.tsung gen. data
                           XML        Tsung                         server
                                                3.tsung measures




                                      reports

                                 4.report generation


Saturday, January 26, 13
TSUNG PHASES..
         Define load clients (localhost or multiple for massive/distributed testing)

         Define servers you want to load test

         Define the load scenario (num. users, arrivals etc, timing)

         Define your monitors (servers you are load testing AND related systems)

         Record or define your user scenarios (proxy and record or manually edit config)

         Run! (tsung -f config.xml start)

         Grab a beer.. (cheers!)

         Generate Graphs (for the data reported by tsung demon)


Saturday, January 26, 13
DEMO


               show: simple_example.xml config

               run: tsung -f simple_example.xml start

               see the log file (default $HOME/.tsung/log/<timestamp>




Saturday, January 26, 13
RECORDING..

               You can either define you data by hand in the configuration
               file or record it via. a proxy and a web browser.

               tsung-recorder -L 9000 start (recorder will listen on port
               9000)

               Now start you browser, configure a new proxy and hit the
               page you want to record.

               Use the out put in your tsung xml file and voila!



Saturday, January 26, 13
WHY TSUNG?
               Your own scripts with curl, wget.. - Stop that!

               AB Apache Bench (slow as he..)

               HTTPPerf (better but still not fast and not distributed)

               JMeter (Java based) - quite good, Nice GUI, distributed! but
               JVM mem and consumption !

               Grinder (Java based)??

               Gatling-Tools (JVM, scala, looks promising..using the akka
               actor principle for concurrency - instead of normal threads -
               similar to erlang)
Saturday, January 26, 13
BURNING SERVERS
          0/1?      load testing or load generation!


                           0   VS       1




Saturday, January 26, 13
MONITOR YOUR LOAD!

               Default SNMP OIDS for CPU usage, network traffic, load,
               memory etc. - No need to install a special agent on the tested
               server

               Define your own OIDs! (patch in 1.4.x done by my poor
               erlang skills)

               With this you can measure your JVM, disk, IO etc.

               Network always the problem... there should be open for
               SNMP and the ports your are testing!


Saturday, January 26, 13
GRAPHS!


               Tsung have now generated data in the log directory (default
               $HOME/.tsung/log.. Can be set different with -d option)

               /usr/local/Cellar/tsung/1.4.2/lib/tsung/bin/tsung_stats.pl
               <log>

               Now HTML is ready and can be served and showed off




Saturday, January 26, 13
DEMO


               tsung -f monitor_example.xml start

               see the log file (default $HOME/.tsung/log/<timestamp>

               Generate graphs from your monitors:

                      /usr/local/Cellar/tsung/1.4.2/lib/tsung/bin/
                      tsung_stats.pl <log>




Saturday, January 26, 13
TSUNG XML CONFIG
                                                     more advanced stuff

               Many options: set browser agents, probability for hit

               Get content from files (CVS or.. define your pattern)

               Mix files or code into config with substitution

               Use xpath or jsonpath to MATCH on the response and make
               you action!

               Use regular expressions as well.. (GNU RegExp)

               Programmatically (use conditionals: for loops, if, repeats or
               variables etc. for testing)

Saturday, January 26, 13
DISTRIBUTED TESTS

               Tsung distributed load testing is based on SSH shell and
               erlang distribution system.

               Distribution is easy! just add more clients!

               Remember to make network accessible for the controller
               and workers - ssh login with a key from controller to all the
               slave nodes (workers) should be available

               Same version of tsung/erlang on EVERY machine
               (controller/workers)


Saturday, January 26, 13
DISTRIBUTED TESTS

   0.write your tsung.xml             1.run         Tsung
                                                                generate/gather
                                                    worker
                                 Tsung
                XML
                               controller           Tsung
                                                                          server
                                                    worker

                                                    Tsung
                                                    worker
                                reports
                                            multiple servers as workers
                           4.report generation



Saturday, January 26, 13
MORE ADVANCED
          STUFF

               Overlay/merge your graphs, useful for comparing (tsplot)

               Besides SNMP we can monitor with Munin or Erlang agents
               on the remote servers..

               Choose another backend: text, json, rrdtool etc. (if you want
               another graphing tool or what ever)

               Measure in realtime or generate afterwards.



Saturday, January 26, 13
MORE ADVANCED
          STUFF


               The recording proxy also works for database protocols
               (query proxy)

               Mix your sessions types (mysq with HTTP or XMPP ...)




Saturday, January 26, 13
TSUNG GOTCHA’S
               If you are new at Erlang, dumps of stack traces can be hard
               if anything is wrong!

               Remember to write the config in the correct order of the
               DTD (its picky!)

               The path to the DTD was wrong.. comes with funny
               exceptions!

               Turn off debugging when testing - it takes time to write.

               Ensure that your versions is the same and compiled (if not a
               package) in the same way if you are running distributed!

Saturday, January 26, 13
TSUNG GOTCHA’S
                                                                         For massive testing
                 set sysctl.conf for many client connections..

                       set the hard limit of “max files open” larger than 1024.

                       Do that on every controller and node! (otherwise you limit
                       yourself!)

                       Do some tuning of the network stack! memory for TCP ,
                       read, write and backlog. Example:
            net.core.rmem_max   =   16777216
            net.core.wmem_max   =   16777216
            net.ipv4.tcp_rmem   =   4096 87380 16777216
            net.ipv4.tcp_wmem   =   4096 65536 16777216

            # This gives the kernel more memory for TCP
            # which you need with many (100k+) open socket connections
            net.ipv4.tcp_mem = 50576 64768 98152

            # Backlog
            net.core.netdev_max_backlog = 2048
            net.core.somaxconn = 1024
            net.ipv4.tcp_max_syn_backlog = 2048
            net.ipv4.tcp_syncookies = 1



Saturday, January 26, 13
TESTING PLAN
          GOTCHAS
               Understand what you are testing

               Prepare your self: write down your expectations, what went
               wrong and what to improve.. Use a wiki (JIRA)

               Store your test for later comparison (use tsplot etc.)

               Test on the correct network. Plan which one. Take into
               consideration that you have to reach the servers being tested
               (both test port and SNMP)

               Prepare your network a massive load!. Be prepared that a
               switch will blow up or so..

Saturday, January 26, 13
LINKS ETC.
               http://tsung.erlang-projects.org

               http://dak1n1.com/blog/14-http-load-generate

               http://programmingobsession.blogspot.dk/2012/09/tsung-
               vs-jmeterj.html

                      Installation:

                           Mac (homebrew): brew install tsung


                           Linux: apt-get install tsung


                           Windows?


                           Compile your own -- a lot of dependencies..

Saturday, January 26, 13

Weitere ähnliche Inhalte

Was ist angesagt?

Odoo Performance Limits
Odoo Performance LimitsOdoo Performance Limits
Odoo Performance LimitsOdoo
 
Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Minchul Jung
 
OpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpen Gurukul
 
Advanced Replication
Advanced ReplicationAdvanced Replication
Advanced ReplicationMongoDB
 
Performance and stability testing \w Gatling
Performance and stability testing \w GatlingPerformance and stability testing \w Gatling
Performance and stability testing \w GatlingDmitry Vrublevsky
 
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1Mickaël Rémond
 
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of BootkitsI/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of BootkitsCrowdStrike
 
MongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetMongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetVivek Parihar
 
OpenNebulaConf2017EU: Torturing OpenNebula for Fun and Profit by Carlo Daffar...
OpenNebulaConf2017EU: Torturing OpenNebula for Fun and Profit by Carlo Daffar...OpenNebulaConf2017EU: Torturing OpenNebula for Fun and Profit by Carlo Daffar...
OpenNebulaConf2017EU: Torturing OpenNebula for Fun and Profit by Carlo Daffar...OpenNebula Project
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupGreg DeKoenigsberg
 
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)Ontico
 
Writing and Publishing Puppet Modules
Writing and Publishing Puppet ModulesWriting and Publishing Puppet Modules
Writing and Publishing Puppet ModulesPuppet
 
Odoo Online platform: architecture and challenges
Odoo Online platform: architecture and challengesOdoo Online platform: architecture and challenges
Odoo Online platform: architecture and challengesOdoo
 
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...ronwarshawsky
 
UltraESB - Installation and Configuration
UltraESB - Installation and ConfigurationUltraESB - Installation and Configuration
UltraESB - Installation and ConfigurationAdroitLogic
 
WebPagetest - Good, Bad & Ugly
WebPagetest - Good, Bad & UglyWebPagetest - Good, Bad & Ugly
WebPagetest - Good, Bad & UglyAaron Peters
 

Was ist angesagt? (20)

Odoo Performance Limits
Odoo Performance LimitsOdoo Performance Limits
Odoo Performance Limits
 
Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법
 
GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)
 
RabbitMQ for Perl mongers
RabbitMQ for Perl mongersRabbitMQ for Perl mongers
RabbitMQ for Perl mongers
 
Tuning Linux for MongoDB
Tuning Linux for MongoDBTuning Linux for MongoDB
Tuning Linux for MongoDB
 
OpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQL
 
Advanced Replication
Advanced ReplicationAdvanced Replication
Advanced Replication
 
Performance and stability testing \w Gatling
Performance and stability testing \w GatlingPerformance and stability testing \w Gatling
Performance and stability testing \w Gatling
 
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
 
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of BootkitsI/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
 
MongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetMongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-Set
 
OpenNebulaConf2017EU: Torturing OpenNebula for Fun and Profit by Carlo Daffar...
OpenNebulaConf2017EU: Torturing OpenNebula for Fun and Profit by Carlo Daffar...OpenNebulaConf2017EU: Torturing OpenNebula for Fun and Profit by Carlo Daffar...
OpenNebulaConf2017EU: Torturing OpenNebula for Fun and Profit by Carlo Daffar...
 
Vagrant
VagrantVagrant
Vagrant
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetup
 
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
 
Writing and Publishing Puppet Modules
Writing and Publishing Puppet ModulesWriting and Publishing Puppet Modules
Writing and Publishing Puppet Modules
 
Odoo Online platform: architecture and challenges
Odoo Online platform: architecture and challengesOdoo Online platform: architecture and challenges
Odoo Online platform: architecture and challenges
 
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
 
UltraESB - Installation and Configuration
UltraESB - Installation and ConfigurationUltraESB - Installation and Configuration
UltraESB - Installation and Configuration
 
WebPagetest - Good, Bad & Ugly
WebPagetest - Good, Bad & UglyWebPagetest - Good, Bad & Ugly
WebPagetest - Good, Bad & Ugly
 

Ähnlich wie Tsung Intro presentation 2013

How Many Slaves (Ukoug)
How Many Slaves (Ukoug)How Many Slaves (Ukoug)
How Many Slaves (Ukoug)Doug Burns
 
SQLIO - measuring storage performance
SQLIO - measuring storage performanceSQLIO - measuring storage performance
SQLIO - measuring storage performancevalerian_ceaus
 
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...Lucidworks
 
Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...wensheng wei
 
Event Processing and Integration with IAS Data Processors
Event Processing and Integration with IAS Data ProcessorsEvent Processing and Integration with IAS Data Processors
Event Processing and Integration with IAS Data ProcessorsInvenire Aude
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XJérôme Petazzoni
 
Apache samza past, present and future
Apache samza  past, present and futureApache samza  past, present and future
Apache samza past, present and futureEd Yakabosky
 
Linux System Monitoring
Linux System Monitoring Linux System Monitoring
Linux System Monitoring PriyaTeli
 
Quantifying Container Runtime Performance: OSCON 2017 Open Container Day
Quantifying Container Runtime Performance: OSCON 2017 Open Container DayQuantifying Container Runtime Performance: OSCON 2017 Open Container Day
Quantifying Container Runtime Performance: OSCON 2017 Open Container DayPhil Estes
 
Planning For High Performance Web Application
Planning For High Performance Web ApplicationPlanning For High Performance Web Application
Planning For High Performance Web ApplicationYue Tian
 
Defcon 22-paul-mcmillan-attacking-the-iot-using-timing-attac
Defcon 22-paul-mcmillan-attacking-the-iot-using-timing-attacDefcon 22-paul-mcmillan-attacking-the-iot-using-timing-attac
Defcon 22-paul-mcmillan-attacking-the-iot-using-timing-attacPriyanka Aash
 
Apache Samza Past, Present and Future
Apache Samza  Past, Present and FutureApache Samza  Past, Present and Future
Apache Samza Past, Present and FutureKartik Paramasivam
 
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...Command Prompt., Inc
 
1. Scaling PHP/MySQL...Presentation from Flickr
	
1.	
Scaling PHP/MySQL...Presentation from Flickr	
1.	
Scaling PHP/MySQL...Presentation from Flickr
1. Scaling PHP/MySQL...Presentation from Flickrakshat
 
Project Portfolio - Transferable Skills
Project Portfolio - Transferable SkillsProject Portfolio - Transferable Skills
Project Portfolio - Transferable Skillstuleyb
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Serversupertom
 
Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014P. Taylor Goetz
 
Immutable infrastructure with Docker and containers (GlueCon 2015)
Immutable infrastructure with Docker and containers (GlueCon 2015)Immutable infrastructure with Docker and containers (GlueCon 2015)
Immutable infrastructure with Docker and containers (GlueCon 2015)Jérôme Petazzoni
 
UKOUG, Lies, Damn Lies and I/O Statistics
UKOUG, Lies, Damn Lies and I/O StatisticsUKOUG, Lies, Damn Lies and I/O Statistics
UKOUG, Lies, Damn Lies and I/O StatisticsKyle Hailey
 

Ähnlich wie Tsung Intro presentation 2013 (20)

How Many Slaves (Ukoug)
How Many Slaves (Ukoug)How Many Slaves (Ukoug)
How Many Slaves (Ukoug)
 
SQLIO - measuring storage performance
SQLIO - measuring storage performanceSQLIO - measuring storage performance
SQLIO - measuring storage performance
 
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...
 
Tuning Solr & Pipeline for Logs
Tuning Solr & Pipeline for LogsTuning Solr & Pipeline for Logs
Tuning Solr & Pipeline for Logs
 
Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...
 
Event Processing and Integration with IAS Data Processors
Event Processing and Integration with IAS Data ProcessorsEvent Processing and Integration with IAS Data Processors
Event Processing and Integration with IAS Data Processors
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
 
Apache samza past, present and future
Apache samza  past, present and futureApache samza  past, present and future
Apache samza past, present and future
 
Linux System Monitoring
Linux System Monitoring Linux System Monitoring
Linux System Monitoring
 
Quantifying Container Runtime Performance: OSCON 2017 Open Container Day
Quantifying Container Runtime Performance: OSCON 2017 Open Container DayQuantifying Container Runtime Performance: OSCON 2017 Open Container Day
Quantifying Container Runtime Performance: OSCON 2017 Open Container Day
 
Planning For High Performance Web Application
Planning For High Performance Web ApplicationPlanning For High Performance Web Application
Planning For High Performance Web Application
 
Defcon 22-paul-mcmillan-attacking-the-iot-using-timing-attac
Defcon 22-paul-mcmillan-attacking-the-iot-using-timing-attacDefcon 22-paul-mcmillan-attacking-the-iot-using-timing-attac
Defcon 22-paul-mcmillan-attacking-the-iot-using-timing-attac
 
Apache Samza Past, Present and Future
Apache Samza  Past, Present and FutureApache Samza  Past, Present and Future
Apache Samza Past, Present and Future
 
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
 
1. Scaling PHP/MySQL...Presentation from Flickr
	
1.	
Scaling PHP/MySQL...Presentation from Flickr	
1.	
Scaling PHP/MySQL...Presentation from Flickr
1. Scaling PHP/MySQL...Presentation from Flickr
 
Project Portfolio - Transferable Skills
Project Portfolio - Transferable SkillsProject Portfolio - Transferable Skills
Project Portfolio - Transferable Skills
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Server
 
Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014
 
Immutable infrastructure with Docker and containers (GlueCon 2015)
Immutable infrastructure with Docker and containers (GlueCon 2015)Immutable infrastructure with Docker and containers (GlueCon 2015)
Immutable infrastructure with Docker and containers (GlueCon 2015)
 
UKOUG, Lies, Damn Lies and I/O Statistics
UKOUG, Lies, Damn Lies and I/O StatisticsUKOUG, Lies, Damn Lies and I/O Statistics
UKOUG, Lies, Damn Lies and I/O Statistics
 

Kürzlich hochgeladen

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Tsung Intro presentation 2013

  • 1. Uncertainty is a recipe for failure! TSUNG LOAD TESTING Testing HTTP(S)/ Databases / LDAP/ XMPP.. <insert your plugin here> January 2013 Steffen Larsen (slarsen@braintrust) twitter: @zooldk Saturday, January 26, 13
  • 2. TSUNG INTRO Introduction to Tsung Walk through the phases of a TSUNG load test Mainly talk about using TSUNG on the HTTP protocol Show simple use cases (my installation is fcked - sorry!) Drink a beer! Saturday, January 26, 13
  • 3. TSUNG INTRO The purpose of Tsung is to simulate users in order to test the scalability and performance of IP based client/server applications. Open Source (GPLv2) Based on Erlang which implicitly defines it as: Highly concurrent and blazingly fast.. Small memory fingerprint (512 bytes for an erlang process vs. 512k default for a JVM stack for a thread) Distributed by the nature of Erlang and easily done (so we can do DDOS!) :-) Multi protocol: HTTP (REST, SOAP,WebDav etc), PostgreSQL, MySQL, LDAP, XMPP/Jabber. Support for SSL and Cookie handling Easy Setup! - no confusing GUI (vi and a DTD is enough). Xorg might not be available on the servers. Saturday, January 26, 13
  • 4. TSUNG IN HTTP LAND Supports both old HTTP 1.0 and 1.1 (Web Sockets on a branch) GET, POST, PUT, DELETE etc. Methods support Cookies are automatically handled WWW basic authentication Basic support for SOAP using HTTP mode Proxy mode to record sessions using a web browser.. Saturday, January 26, 13
  • 5. TSUNG LIFE CYCLE 0.write your tsung.xml 1.run 2.tsung gen. data XML Tsung server 3.tsung measures reports 4.report generation Saturday, January 26, 13
  • 6. TSUNG PHASES.. Define load clients (localhost or multiple for massive/distributed testing) Define servers you want to load test Define the load scenario (num. users, arrivals etc, timing) Define your monitors (servers you are load testing AND related systems) Record or define your user scenarios (proxy and record or manually edit config) Run! (tsung -f config.xml start) Grab a beer.. (cheers!) Generate Graphs (for the data reported by tsung demon) Saturday, January 26, 13
  • 7. DEMO show: simple_example.xml config run: tsung -f simple_example.xml start see the log file (default $HOME/.tsung/log/<timestamp> Saturday, January 26, 13
  • 8. RECORDING.. You can either define you data by hand in the configuration file or record it via. a proxy and a web browser. tsung-recorder -L 9000 start (recorder will listen on port 9000) Now start you browser, configure a new proxy and hit the page you want to record. Use the out put in your tsung xml file and voila! Saturday, January 26, 13
  • 9. WHY TSUNG? Your own scripts with curl, wget.. - Stop that! AB Apache Bench (slow as he..) HTTPPerf (better but still not fast and not distributed) JMeter (Java based) - quite good, Nice GUI, distributed! but JVM mem and consumption ! Grinder (Java based)?? Gatling-Tools (JVM, scala, looks promising..using the akka actor principle for concurrency - instead of normal threads - similar to erlang) Saturday, January 26, 13
  • 10. BURNING SERVERS 0/1? load testing or load generation! 0 VS 1 Saturday, January 26, 13
  • 11. MONITOR YOUR LOAD! Default SNMP OIDS for CPU usage, network traffic, load, memory etc. - No need to install a special agent on the tested server Define your own OIDs! (patch in 1.4.x done by my poor erlang skills) With this you can measure your JVM, disk, IO etc. Network always the problem... there should be open for SNMP and the ports your are testing! Saturday, January 26, 13
  • 12. GRAPHS! Tsung have now generated data in the log directory (default $HOME/.tsung/log.. Can be set different with -d option) /usr/local/Cellar/tsung/1.4.2/lib/tsung/bin/tsung_stats.pl <log> Now HTML is ready and can be served and showed off Saturday, January 26, 13
  • 13. DEMO tsung -f monitor_example.xml start see the log file (default $HOME/.tsung/log/<timestamp> Generate graphs from your monitors: /usr/local/Cellar/tsung/1.4.2/lib/tsung/bin/ tsung_stats.pl <log> Saturday, January 26, 13
  • 14. TSUNG XML CONFIG more advanced stuff Many options: set browser agents, probability for hit Get content from files (CVS or.. define your pattern) Mix files or code into config with substitution Use xpath or jsonpath to MATCH on the response and make you action! Use regular expressions as well.. (GNU RegExp) Programmatically (use conditionals: for loops, if, repeats or variables etc. for testing) Saturday, January 26, 13
  • 15. DISTRIBUTED TESTS Tsung distributed load testing is based on SSH shell and erlang distribution system. Distribution is easy! just add more clients! Remember to make network accessible for the controller and workers - ssh login with a key from controller to all the slave nodes (workers) should be available Same version of tsung/erlang on EVERY machine (controller/workers) Saturday, January 26, 13
  • 16. DISTRIBUTED TESTS 0.write your tsung.xml 1.run Tsung generate/gather worker Tsung XML controller Tsung server worker Tsung worker reports multiple servers as workers 4.report generation Saturday, January 26, 13
  • 17. MORE ADVANCED STUFF Overlay/merge your graphs, useful for comparing (tsplot) Besides SNMP we can monitor with Munin or Erlang agents on the remote servers.. Choose another backend: text, json, rrdtool etc. (if you want another graphing tool or what ever) Measure in realtime or generate afterwards. Saturday, January 26, 13
  • 18. MORE ADVANCED STUFF The recording proxy also works for database protocols (query proxy) Mix your sessions types (mysq with HTTP or XMPP ...) Saturday, January 26, 13
  • 19. TSUNG GOTCHA’S If you are new at Erlang, dumps of stack traces can be hard if anything is wrong! Remember to write the config in the correct order of the DTD (its picky!) The path to the DTD was wrong.. comes with funny exceptions! Turn off debugging when testing - it takes time to write. Ensure that your versions is the same and compiled (if not a package) in the same way if you are running distributed! Saturday, January 26, 13
  • 20. TSUNG GOTCHA’S For massive testing set sysctl.conf for many client connections.. set the hard limit of “max files open” larger than 1024. Do that on every controller and node! (otherwise you limit yourself!) Do some tuning of the network stack! memory for TCP , read, write and backlog. Example: net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216 # This gives the kernel more memory for TCP # which you need with many (100k+) open socket connections net.ipv4.tcp_mem = 50576 64768 98152 # Backlog net.core.netdev_max_backlog = 2048 net.core.somaxconn = 1024 net.ipv4.tcp_max_syn_backlog = 2048 net.ipv4.tcp_syncookies = 1 Saturday, January 26, 13
  • 21. TESTING PLAN GOTCHAS Understand what you are testing Prepare your self: write down your expectations, what went wrong and what to improve.. Use a wiki (JIRA) Store your test for later comparison (use tsplot etc.) Test on the correct network. Plan which one. Take into consideration that you have to reach the servers being tested (both test port and SNMP) Prepare your network a massive load!. Be prepared that a switch will blow up or so.. Saturday, January 26, 13
  • 22. LINKS ETC. http://tsung.erlang-projects.org http://dak1n1.com/blog/14-http-load-generate http://programmingobsession.blogspot.dk/2012/09/tsung- vs-jmeterj.html Installation: Mac (homebrew): brew install tsung Linux: apt-get install tsung Windows? Compile your own -- a lot of dependencies.. Saturday, January 26, 13