PHP uses AB in Apache to test the website's stress performance _ PHP Tutorial

Source: Internet
Author: User
PHP uses AB in Apache to test the website's stress performance. Open the installation tool of the apacheserver (wampserverplugin is used, and an executable program of AB .exe is included in the bindirectory, which is the stress testing tool to be introduced. Run commands on Windows to open the installation path of the Apache server (wampserverplugin is used, and an executable program of AB .exe is included in the bindirectory. it is the stress testing tool to be introduced.



In the command line of the Windows system, enter the AB .exeprogram directory and execute the AB .exe program. Note that double-click fails to run correctly. <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + ICAgICAgICBkOii72LO1L734yOtExcwpPGJyPgo8L3A + CjxwPiA8aW1nIHNyYz0 = "http://www.2cto.com/uploadfile/Collfiles/20140614/20140614091704240.jpg" alt = "\">


  

Cd wamp \ bin \ apache \ Apache2.4.4 \ bin (press ENTER/enter the bin directory)


 

AB (press ENTER /)

If you see the following help information, it means that AB is successfully started.



Start AB stress testing

AB-n 5000-c 200 http: // localhost/test. php

In the preceding example, the total number of accesses to the http: // localhost/test. php script is 5000, which is 200 concurrent (simulating simultaneous access by 200 users ).

Common AB parameters:

-N: total number of requests executed. the default value is 1;

-C: Number of concurrencies. the default value is 1;

-T: The total time of the test, in seconds. the default value is 50000 s.

-P: Data File during POST

-W: output results in HTML table format



Example (I use wampserverexample, and there is an executable program of AB .exe in the bindirectory. it is the stress testing tool to be introduced. Commands in Windows...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.