ApacheBench Vs. Siege

I want to like Apache-bench more than I do. Although very simple to use with excellent reporting and widespread support, I keep abandoning it and find myself load testing with Siege. The main reason for this is the use of a url file. With siege, I can quickly and easily hit a file of urls at random, thus getting a more complete test of my app.

ex:
siege -c 100 -t 10m -i -f links.txt
(with the links file containing as many urls as I need)

At first glance, there wasn’t an easy way to do that in Apache-bench. Then I ran into an article describing how to do just that. (and it is easy, no less!)

“ab -n 100 -c 10 http://127.0.0.1:8300/test.cfm > test1.txt &
ab -n 100 -c 10 http://127.0.0.1:8300/scribble.cfm > test2.txt &”

( quoted from article above, published on this site. )

I was totally excited to find a solution to the multiple url issue and ready to give Apache-bench another shot. Unfortunately, the results are reported separately and would need to be aggregated by hand, as far as I can tell. Does any one use Apache-bench for multiple urls and have a solution for the reporting issue? How do you evaluate load data for larger scale load tests?

Print Friendly
If you enjoyed this post, make sure you subscribe to my RSS feed!
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to ApacheBench Vs. Siege


  1. #!/bin/bash
    URL="http://myurl.com"
    SLEEP=30
    URIS=(
    "/"
    "/aboutus.html"
    "/dynamic.php"
    "/dynamicmore.php?id=34252"
    "/search?q=${RANDOM}&show=all"
    "/anotherawesomepageofanything"
    )
    date
    echo -e "Batch Apache-Benchmarking on n${URL}"
    for URI in ${URIS[@]};
    do
    echo "uri: ${URI}"
    ab -n 100 -c 5 -A xwander:xwander-awesome "${URL}${URI}"
    sleep ${SLEEP}
    echo "================================================================\n"
    done

    just run the script and write the output to a file
    then i use meld to compare the results from two files, to see before and after a certain feature or something was added.

  2. incidentally, the script isn’t completely written by me, i got it in a search when going through google

  3. Shem says:

    check this out:
    http://code.google.com/p/apachebench-for-multi-url/
    haven’t tried this yet but seems exactly what you need.
    the problem it’s not randomly selected, but there is a path there that might fix that.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>