• No results found

How to create a load testing environment for your web apps using open source tools by Sukrit Dhandhania

N/A
N/A
Protected

Academic year: 2021

Share "How to create a load testing environment for your web apps using open source tools by Sukrit Dhandhania"

Copied!
20
0
0

Loading.... (view fulltext now)

Full text

(1)

How to create a load testing

environment for your web apps using

open source tools

(2)

Open source load testing for web

 putting demand on an application and

measuring its response

 see how application acts when you have

several concurrent users logging in

 difference between "regression testing tools"

and "load testing"

 goal - to define the maximum amount of load a

(3)

What do we test for?

 how does my application act when I have more

than a single user logged in?

 what hardware configuration does my

application need?

 how does my application scale with more and

more concurrent users?

 how much load can my application handle?

 up to what point is my application useable with

a growing load?

 what is the right web/app and database server

(4)

What do we test?

 the application

 the front end servers with different hardware

and software configurations

(5)

How do we test?

 Application:

 log in

 run search

 add item to cart  check out

 Front-end servers:

 create a simple page and hit it with different loads  change configuration and run tests again

 Database servers:

 transactional read/write benchmarks

(6)

What tools can we use?

 Web Server/Application:  apache bench  siege  httperf  Jmeter  Database:  sysbench  iibench

(7)

Monitoring and creating graphs

 monitor the performance of our servers

 use test monitoring data to build graphs for

easy comparison

 use dstat to gather monitoring information

 use gnuplot to plot graphs

 or use orca to get monitoring and graphing all in

(8)

Let's get our hands dirty

 setup the applications required for simulating a

load on the web server

 setup monitoring tool - dstat

 run tests and restart web server after each test

(9)

Web server load testing with

Apache bench

 get apache bench

 write a simple web application that will read

some data from the DB and display

 run a test such as "# ab -n 100 -c 10

http://localhost/benchmark.php"

 this will create 10 concurrent threads and a

total of 1000 requests

(10)

How do we use siege for our load

test?

 get siege from ftp://ftp.joedog.org/pub/siege/

 "siege -c25 -t1M http://localhost/bookmark.php"

- 25 concurrent users for 1 minute

 great thing about it is that you can use the

POST feature with this tool

(11)

How do we use httperf?

 get from http://httperf.sf.net

 one the most advanced command line load

testing tool

 "# httperf --server localhost --uri

/benchmark.php --num-conn 1000 --num-call 10 --rate 200 --timeout 5"

(12)

How do we monitor the

performance of our servers?

 get dstat from

http://dag.wieers.com/home-made/dstat/

 simple, great, flexible, all info you need, with

csv output file...

 "# dstat --output benchmark.csv -tcmn 10" -

read time, cpu, memory, and network every 10 seconds and write to file

(13)

How do we run the actual tests?

 localhost vs remote server

 leave gap between tests

 restart server

 start monitoring before you fire the load building

(14)

How we test the database server

with sysbench?

 general database performance evaluation tool

 helps you evaluate your OS's parameters for

database server without installing DB

 get from http://sysbench.sourceforge.net

 "# sysbench --num-threads=16

--max-requests=100000 --test=oltp --oltp-table-size=1000000 \

(15)

How to use iibench to test the

database server?

 iibench does a raw INSERT testing of your

database

 get from http://tokutek.com/contest.php

 great for web application where you expect a lot

(16)

How do we run the actual load

testing for our database servers?

 run tests with default configuration

 modify database server configuration and run

tests again

 restart database server after each test

 try with different hardware configurations

(17)

What do we do with all this

performance monitoring data?

 we plot graphs

 use a spreadsheet application

 gnuplot is very advanced, flexible, and can read

from csv files

(18)

How do we get monitoring and

graphs all in one package?

 get orca from

http://www.orcaware.com/orca/pub/snapshots/

 lots of perl prerequisites

 runs on the web server, so easy to access

remotely

(19)

What next?

 automate the testing by scripting

 fine tune and improve test framework

 limitations of this type of testing

 browsermob

(20)

About me

 Sukrit from Pondicherry, India

 open source enthusiast

 help organizations adopt open source tools

References

Related documents

Key words: calf starter, fermented cabbage waste, feed intake, feces consistency and body weight

Although the Manual reviews in detail the various legal and practical issues involved in the administration of estates, the Manual is primarily intended to be a procedural guide

(b) Financial products ( other than insurance, superannuation or a RSA product or service ) – To qualify as a wholesale client the guidelines in Chapter 7 of the Act are to be

Growing evidence suggests that the neurocognitive mechanisms mediating behavioral inhibition (motor inhibition, cognitive inflexibility) reversal learning and habit formation

[r]

The power spectra density of the streamwise velocity obtained from the LDA data is shown in figure 14 and in the pre-multiplied form in figure 15 for each point at the different

You create a synthetic workload dataset with an included tool, load it into the instance via a new test database (DS2), and then run an included load testing tool to simulate orders

Many machine learning tools have been applied to the problem of condition monitoring using static machine learning structures such as artificial neural network, support vector