Performance and Load Testing Web Applications



A clearly defined set of expectations is essential for meaningful performance testing.  We can do performance testing based on following parameters :


1. Expected load in terms of concurrent users or HTTP connections
2. Acceptable response time


The performance testing is done by constantly increasing the load on the system while looking for bottlenecks. To start with we can take a black-box approach in running the load tests against the system under test. Tools such us "ab", "JMeter" etc can be used to simulate concurrent users/HTTP connections and measure response times. These test results are used in identifying performance issues.  The performance issues can be due to various bottle necks and to pinpoint them we have to get into white box testing, where the system is inspected and monitored "from the inside out" and from a variety of angles. In Web applications, these bottlenecks can exist at multiple levels, and to pinpoint them we use a variety of tools: 


Application level: At application level we use profilers to spot inefficiencies in the code (for example poor search algorithms)
Database Level: At the database level we use database-specific profilers and query optimizers
Operating System level: At OS level we use utilities such as top, vmstat, iostat etc to monitor hardware resources such as CPU, memory, swap, disk I/O; We also use munin And monit for overall Server Monitoring.
Network level: At network level we use packet sniffers such as tcpdump, network protocol analyzers such as ethereal, and various utilities such as netstat,ntop, etc..

No comments: