Digital Poets Society: Symfony2 Load Testing

Download Digital Poets Society: Symfony2 Load Testing

Post on 23-Aug-2014

27 views

Category:

Internet

1 download

Embed Size (px)

DESCRIPTION

 

TRANSCRIPT

<ul><li> Load Testing </li> <li> Load Testing </li> <li> Me David Gilbert Hosting Manager @ August david.gilbert@august.com.au </li> <li> Me Ops not Dev </li> <li> Whats 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 </li> <li> Warning! Contains nuts Your mileage may WILL vary </li> <li> 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. </li> <li> Types of Load Testing Performance Testing Capacity Testing Stress Testing Volume Testing Endurance Testing Regression Testing </li> <li> Types of Load Testing Performance Testing Capacity Testing Stress Testing Volume Testing Endurance Testing Regression Testing </li> <li> Load Testing Tools </li> <li> Apache JMeter </li> <li> HP LoadRunner </li> <li> Load Impact </li> <li> Siege http://www.joedog.org/siege-home/ </li> <li> Assumed Infrastructure </li> <li> Preparing for battle - ~/.siegerc Create an initial configuration $ siege.config Customise csv = true show-logfile = false benchmark = true </li> <li> But the pages I need to test are password protected! http basic authentication login = Cookie based authentication login-url = </li> <li> Specifying pages to test Two ways: On the command line $ siege http://www.example.com/ Using a file of URLs file = </li> <li> Laying siege Dont do this: $ siege -c 200 -t 10m Start simple $ siege -c 1 -t 30s Save the individual test timings $ siege -c 1 -t 30s &gt; siege.csv </li> <li> Interpreting Results - Summary </li> <li> Interpreting Results </li> <li> Pitfalls Dont 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 </li> <li> iptables Connection Tracking $ sysctl net.netfilter.nf_conntrack_max net.netfilter.nf_conntrack_max = 31884 $ sudo tail -f /var/log/messages Jun 4 22:14:27 noc kernel: nf_conntrack: table full, dropping packet. $ sudo sysctl -w net.netfilter.nf_conntrack_max=49152 net.netfilter.nf_conntrack_max = 49152 </li> <li> TCP TIME_WAIT state $ sysctl net.ipv4.ip_local_port_range net.ipv4.ip_local_port_range = 32768 61000 =&gt; 28,233 usable ports $ sudo sysctl -w net.ipv4.ip_local_port_range=1024 65535 net.ipv4.ip_local_port_range = 1024 65535 </li> <li> Beat those Web Apps! </li> </ul>