Using ‘ab’ (Apache Benchmark) for concurrent/many different (or random) URLs, Requests or connections

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Two options:

Easy and Simple run with compiled 64bit executable version :

Download at: ab-patched-for-mutiple-requests.tar

To build it by yourself:

  • Download httpd-2.2.4.tar from here or Apache’s archive site
  • Unpack the tar file and cd into it
  • Copy and Paste the patch into the source folder and apply it.  (Download at: ab_append_requests)
  • $ cd httpd-2.2.4/support/
    $ patch -p0 < ~/ab_append_requests.patch
  • Run ./configure –with-included-apr –enable-static-ab –enable-ssl (the first option will ignore the more recent copy of apr that’ll be on your machine already, and the second will build a static binary—well, not completely static, but good enough to be independent)
  • make (you can specify -jn where n is the number of processor cores you have; this will speed up the build a lot)


use -R command with the URL file path and other parameters you want:

./ab -n 2 -R randomList.txt -c 2 -g /test/testgnu ""

randomList.txt contains your URLs or parameters to be appended to the URL. For example:


The connections and requests will be sent to the URL one by one from the list.

Thanks to Chris, reference:

Read More