How to use Apache's AB tool for website performance testing

Source: Internet
Author: User
Tags php script website performance

The Apache server comes with an AB stress test tool that can be used to test website performance and ease of use.

1. Open the Apache server installation path, in the bin directory there is a Ab.exe executable program, is the stress test tool we want to introduce.

2. Under the Windows System command line, go to the directory where the Ab.exe program is located and execute the Ab.exe program. Note the direct double-click does not work correctly.

3.

AB's usage is: AB [options] [http://]hostname[:p Ort]/path

Example: Ab-n 5000-c http://localhost/index.php

The above example shows a total of 5,000 accesses to the http://localhost/index.php script, and 200 concurrent execution at the same time.

Introduction of the common parameters of AB:

-N: Total number of requests executed, default is 1;

-C: Concurrency number, default is 1;

-T: Total time to test, seconds, default 50000s

Data files when-p:post

-W: Output results in HTML table format

4. Execute the test case: Ab-n 1000-c 100-w http://localhost/index.php >>c:\1.html

The above test case represents 100 concurrent scenarios, a total of test accesses to the index.php script 1000 times, and the test results are saved to the c:\1.html file.

How to use Apache's AB tool for website performance testing

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.