: This article mainly introduces php performance optimization (1) stress testing tools. For more information about PHP tutorials, see. Use AB
The stress testing tool AB attached to Apache is very easy to use and allows you to initiate a test request to the Web server based on various conditions. AB can directly initiate a test request on the Web server. this is critical to understanding the server's processing performance, because it does not include the network transmission time of data and the local computing time of the user's PC ..
To execute the connection for 1000 times and concurrent for 20 times (in parallel ):
Syntax: AB-n 1000-c 20 www.baidu.com
Note the following:
§ Time taken for tests: total execution Time (over 1000 times)
§ Requests per second: the average number of connections that can be processed per second.
Webbench
A maximum of 30 thousand concurrent connections can be simulated to test the load capacity of the website. I personally feel better than the AB stress testing tool that comes with Apache, which is especially convenient for installation and use.
Webbench installation
Wget http://home.tiscali.cz/cz210552/distfiles/webbench-1.5.tar.gztar zxvf webbench-1.5.tar.gzcd webbench-1.5make & make install
Webbench usage
Webbench-c 500-t 30 http: // 127.0.0.1/test. php
Webbench parameter description
-C indicates the number of concurrencies, and-t indicates the time (seconds)
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
The above describes the php performance optimization (I) stress testing tools, including content, hope to be helpful to friends who are interested in PHP tutorials.