Performing load test in Apache HTTPD with ab benchmarking tool

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux (RHEL)
    • 7.x
  • Red Hat Software Collections (RHSCL)
    • 2.x
    • 3.x
  • Red Hat JBoss Web Server (JWS)
    • 3.0.x
  • Red Hat JBoss Core Services (JBCS)
  • Apache HTTPD server
    • 2.4.x

Issue

How to perform a stress test on Apache HTTPD server?

Resolution


Disclaimer: The following information has been provided by Red Hat, but is outside the scope of the posted This content is not included.Service Level Agreements and This content is not included.Scope of Coverage. Red Hat does not support software contained in the EPEL repository, or other third-party repositories, or from third-party non-Red Hat sources. The information is provided as-is without representations or warranties about the suitability or accuracy of the information provided. The intent is to provide information to accomplish the system's needs. Use of the information below is at the user's own risk.

Links contained herein to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.


Apache has a tool called ab.

That tool is automatically installed with the httpd package in RHEL.

This is an example:

 ab -c 100 -n 10000 http://yourserverip/index.html

That will test 100 multiple requests at a time (-c argument) and 10000 requests (-n argument).

For more information about the ab tool refer to Content from httpd.apache.org is not included.ab - Apache HTTP server benchmarking tool

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.