Performance Testing your Web Server
To benchmark the performance of your web server applications we recommend the Apache "ab" tool. The ab tool will show how many requests per second your Apache installation is capable of serving. The ab tool is a part of the Apache httpd package in CentOS and Red Hat distributions and the "apache2-utils" package in Debian.
Below is the basic ab command and its output. The -c parameter specifies the number of connections; the -k stands for HTTP Keep-Alive; and the -tparameter sets the time in seconds for which each connection is alive. The application is then hammered through those connections.
- To perform a "flood" test we set the number of requests (-n) to, say, 5000, and assign the number of concurrent connections{{ (-c}}) to something like 200:
- If the ab output makes you suspect issues, it is useful to look into any replies using tcpdump. In particular, tcp-rst replies could appear. To catch them, use:
- We are interested mostly in tcp-rst server replies, as they point to misconfiguration or performance issues. To catch server-side tcp-rst replies use:where 89.253.250.50 is the server hosting your tests.
No comments:
Post a Comment