Download - Digital Poets Society: Symfony2 Load Testing
Load Testing
Load Testing
Me
Ops not Dev
What’s this got to do with Symfony2?
“On the other hand, Symfony2 was
conceived from the start to be fast, with a
strong emphasis on performance.”- The technological benefits of Symfony in 6 easy lessons
http://symfony.com/six-technical-reasons
Warning! Contains nuts
Your mileage may WILL vary
What is Load Testing?“Load testing is a simulation of multiple users working with a web application at
the same time.”
“It can be performed for a number of purposes, but the main goal is to check
the performance of the application.”
Types of Load Testing
Performance Testing
Capacity Testing
Stress Testing
Volume Testing
Endurance Testing
Regression Testing
Types of Load Testing
Performance Testing
Capacity Testing
Stress Testing
Volume Testing
Endurance Testing
Regression Testing
Load Testing Tools
Apache JMeter
HP LoadRunner
Load Impact
Assumed Infrastructure
Preparing for battle - ~/.siegercCreate an initial configuration
$ siege.configCustomise
csv = trueshow-logfile = false
benchmark = true
But the pages I need to test are password protected!http basic authentication
login =Cookie based authentication
login-url =
Specifying pages to testTwo ways:
On the command line$ siege http://www.example.com/
Using a file of URLsfile =
Laying siegeDon’t do this:
$ siege -c 200 -t 10m
Start simple$ siege -c 1 -t 30s
Save the individual test timings$ siege -c 1 -t 30s > siege.csv
Interpreting Results - Summary
Interpreting Results
Pitfalls· Don’t load test your load testing host
· Know the capacity of the network between your load test host and the load test target
· Monitor the load test target and check for contention when testing
iptables Connection Tracking$ sysctl net.netfilter.nf_conntrack_maxnet.netfilter.nf_conntrack_max = 31884
$ sudo tail -f /var/log/messagesJun 4 22:14:27 noc kernel: nf_conntrack: table full, dropping packet.
$ sudo sysctl -w net.netfilter.nf_conntrack_max=49152net.netfilter.nf_conntrack_max = 49152
TCP TIME_WAIT state$ sysctl net.ipv4.ip_local_port_rangenet.ipv4.ip_local_port_range = 32768 61000
=> 28,233 usable ports$ sudo sysctl -w net.ipv4.ip_local_port_range=’1024
65535’net.ipv4.ip_local_port_range = 1024 65535
Beat those Web Apps!