Apache Benchmarking (ab) on CentOS

I kept forgetting the Apache Benchmark location on CentOS servers, so for my own reference:

# /usr/local/apache/bin/ab

Apache Benchmarking is a great tool for testing Apache performance on web servers, for example running the following bash command:

# /usr/local/apache/bin/ab -n 100 -c 5 http://google.com/ 

This will test 100 connections (-n), limited to 5 concurrent connections (-c) on the website google.com

You can also run Apache Benchmarking straight from Mac terminal using:

# ab -n 100 -c 5 http://google.com/ 

Tip: make sure you end the url to test with a trailing slash or filename or the command won’t work

2 thoughts on “Apache Benchmarking (ab) on CentOS

  1. ln -s /usr/local/apache/bin/ab /bin/ab

    and you won’t have to remember it’s location anymore 🙂

  2. Man, you saved me. Using centos 6.5 with cpanel, I though that for some reason ab was not installed, and I had to compile it, or installing using an rpm I needed to search, and I was about to do it when I found this.

    In other distro versions, you can run ab from anywhere.

Comments are closed.